block: use integrity interval instead of sector as seed
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest5 patches 6 repliesIn review
- v36 patches 7 repliesSuperseded
- v26 patches 7 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 6 patches | 14 replies | Superseded |
Changes in v4 from the cover letter
- Drop patch already applied
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | block: use integrity interval instead of sector as seedblock/ block/ | +4 | 2 replies | |
| 2/5 | blk-integrity: take u64 in bio_integrity_intervals()include/ | +7 | 0 replies | |
| 3/5 | bio-integrity-fs: use integrity interval instead of sector as seedblock/ | +1 | 1 reply | |
| 4/5 | t10-pi: use bio_integrity_intervals() helperblock/ | +1 | 0 replies | |
| 5/5 | blk-integrity: avoid sector_t in bip_{get,set}_seed()block/ block/ drivers/ +4 more | +19 | 0 replies |
Reviews trailers per patch
4 of 5 patches have a Reviewed-by or Acked-by.
| Patch | Anuj Gupta | Christoph Hellwig |
|---|---|---|
| 1/5 | R-b | R-b |
| 2/5 | R-b | R-b |
| 3/5 | R-b | R-b |
| 4/5 | R-b | R-b |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/5] block: use integrity interval instead of sector as seed
The block integrity layer currently sets the integrity seed (initial reference tag) in units of 512-byte sectors. However, Type 1 and Type 2 ref tags are actually in units of integrity intervals. On devices with integrity interval size > 512 bytes, ref tags are seeded incorrectly.
Ref tag "remapping" in blk_integrity_{prepare,complete}() covers up this ref tag seed discrepancy by offsetting all ref tags in each bio to convert to/from the absolute integrity interval numbers. But REQ_OP_ZONE_APPEND operations don't have their ref tags remapped, so the ref tags using units of sectors will be stored to the device. As future optimizations, the ref tag remapping could be avoided entirely on NVMe and some SCSI devices by passing the ref tag seed instead of the absolute integrity interval as the expected initial ref tag.
So avoid relying on remapping to convert between the ref tag seed in units of sectors and stored ref tags in units of integrity intervals. Initialize the ref tag seed as the integrity interval, not sector.
The subsequent commits clean up the integrity ref tag seed code a bit.
v4:
- Drop patch already applied
v3: https://lore.kernel.org/linux-block/[email protected]/T/
- Drop bi and bip arguments to bip_set_seed() (Christoph)
v2:
- Reorder fixes before refactoring commits
- Use u64, SECTOR_SHIFT (Christoph)
- Don't take sector_t in bip_set_seed() (Christoph)
Caleb Sander Mateos (5):
block: use integrity interval instead of sector as seed
blk-integrity: take u64 in bio_integrity_intervals()
bio-integrity-fs: use integrity interval instead of sector as seed
t10-pi: use bio_integrity_intervals() helper
blk-integrity: avoid sector_t in bip_{get,set}_seed()
block/bio-integrity-fs.c | 2 +- block/bio-integrity.c | 4 ++-- block/t10-pi.c | 7 ++++--- drivers/nvme/target/io-cmd-bdev.c | 3 +-- drivers/target/target_core_iblock.c | 3 +-- include/linux/bio-integrity.h | 11 ----------- include/linux/blk-integrity.h | 27 ++++++++++++++++++++------- include/linux/bvec.h | 1 + 8 files changed, 30 insertions(+), 28 deletions(-)
Signature · 1 line
2.54.0