block: fix integrity offset/length conversions#722
block: fix integrity offset/length conversions#722blktests-ci[bot] wants to merge 6 commits intofor-next_basefrom
Conversation
|
Upstream branch: 5d77540 |
9bc393d to
5d5a7b8
Compare
|
Upstream branch: 6030f93 |
b0ef450 to
a3b28c4
Compare
5d5a7b8 to
841c373
Compare
|
Upstream branch: 15c4162 |
a3b28c4 to
88fa415
Compare
|
Upstream branch: 15c4162 |
88fa415 to
797365c
Compare
|
Upstream branch: 15c4162 |
797365c to
7604e46
Compare
|
Upstream branch: 15c4162 |
7604e46 to
db6e20c
Compare
841c373 to
69199d7
Compare
|
Upstream branch: cb793ff |
db6e20c to
088a3c9
Compare
69199d7 to
33cdc91
Compare
|
Upstream branch: 7eb7e8a |
088a3c9 to
a2b90af
Compare
33cdc91 to
7fcb275
Compare
To allow bio_integrity_intervals() to convert an absolute sector_t to an absolute integrity interval, change its argument type to sector_t and its return type to u64. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
bio_integrity_setup_default() and blk_integrity_iterate() set the integrity seed (initial reference tag) to the absolute address in the block device in units of 512-byte sectors. The seed is correctly incremented/decremented in units of integrity intervals in bio_integrity_map_iter(), bio_integrity_advance(), and blk_integrity_interval(). As a result, the ref tag written or read to a particular integrity interval on a block device with integrity interval size > 512 bytes varies with the starting offset of the read/write. Convert the initial seed to units of integrity intervals so a consistent ref tag is used for each integrity interval. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Fixes: 3be91c4 ("block: Deprecate the use of the term sector in the context of block integrity") Fixes: 63573e3 ("bio-integrity: Restore original iterator on verify stage") Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
bio_integrity_verify() expects the passed struct bvec_iter to be an iterator over bio data, not integrity. So construct a separate data bvec_iter without the bio_integrity_bytes() conversion and pass it to bio_integrity_verify() instead of bip_iter. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Fixes: 0bde8a1 ("block: add fs_bio_integrity helpers") Reviewed-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
bip_iter.bi_sector is meant to be in units of integrity intervals rather than 512-byte sectors. bio_integrity_verify() doesn't actually use it currently (it uses the passed in struct bvec_iter's bi_sector instead). But let's set it to the expected value for consistency. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Use bio_integrity_intervals() to convert blk_rq_pos(rq) to integrity intervals to reduce code duplication. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Use bio_integrity_intervals() to convert bio->bi_iter.bi_sector to integrity intervals to reduce code duplication. Make the same change in the nvmet code that appears to have been copied from the target code. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
|
Upstream branch: 88a57e1 |
a2b90af to
3d826e8
Compare
Pull request for series with
subject: block: fix integrity offset/length conversions
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1077122