mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
block: prepare generation / verification helpers for fs usage
Return the status from verify instead of directly stashing it in the bio, and rename the helpers to use the usual bio_ prefix for things operating on a bio. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Tested-by: Anuj Gupta <anuj20.g@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
7afe93946d
commit
3f00626832
@@ -39,7 +39,7 @@ static void bio_integrity_verify_fn(struct work_struct *work)
|
||||
container_of(work, struct bio_integrity_data, work);
|
||||
struct bio *bio = bid->bio;
|
||||
|
||||
blk_integrity_verify_iter(bio, &bid->saved_bio_iter);
|
||||
bio->bi_status = bio_integrity_verify(bio, &bid->saved_bio_iter);
|
||||
bio_integrity_finish(bid);
|
||||
bio_endio(bio);
|
||||
}
|
||||
@@ -100,7 +100,7 @@ void bio_integrity_prep(struct bio *bio, unsigned int action)
|
||||
|
||||
/* Auto-generate integrity metadata if this is a write */
|
||||
if (bio_data_dir(bio) == WRITE && bip_should_check(&bid->bip))
|
||||
blk_integrity_generate(bio);
|
||||
bio_integrity_generate(bio);
|
||||
else
|
||||
bid->saved_bio_iter = bio->bi_iter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user