]> Git Repo - linux.git/commit
bio-integrity: Fix bio_integrity_verify segment start bug
authorNicholas Bellinger <[email protected]>
Wed, 22 Jan 2014 04:32:05 +0000 (20:32 -0800)
committerJens Axboe <[email protected]>
Wed, 22 Jan 2014 04:32:05 +0000 (20:32 -0800)
commit5837c80e870bc3b12ac6a98cdc9ce7a9522a8fb6
tree35b9a82820cf87bb133d4773e416a8d3b293b604
parentbca266b3886b8bc587db044750c8a00d674b4d09
bio-integrity: Fix bio_integrity_verify segment start bug

This patch addresses a bug in bio_integrity_verify() code that has
been causing DIF READ verify operations to be silently skipped.

The issue is that bio->bi_idx will have been incremented within
bio_advance() code in the normal blk_update_request() ->
req_bio_endio() completion path, and bio_integrity_verify() is
using bio_for_each_segment() which starts the bio segment walk
at the current bio->bi_idx.

So instead use bio_for_each_segment_all() to always start the bio
segment walk from zero, regardless of the current bio->bi_idx
value after bio_advance() has been called.

Cc: Martin K. Petersen <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
Cc: [email protected] # >= v3.10
Signed-off-by: Jens Axboe <[email protected]>
fs/bio-integrity.c
This page took 0.054422 seconds and 4 git commands to generate.