Re: [PATCH 2/6] block: use integrity interval instead of sector as seed

Christoph Hellwig
2026-04-06T06:35:01Z

On Fri, Apr 03, 2026 at 01:41:05PM -0600, Caleb Sander Mateos wrote:
> void bio_integrity_setup_default(struct bio *bio)
> {
> struct blk_integrity *bi = blk_get_integrity(bio->bi_bdev->bd_disk);
> struct bio_integrity_payload *bip = bio_integrity(bio);
>
> - bip_set_seed(bip, bio->bi_iter.bi_sector);
> + bip_set_seed(bip, bio_integrity_intervals(bi, bio->bi_iter.bi_sector));

Should we simply switch bip_set_seed to take a bio bvec_iter argument and
lift all this logic into it? That feels a lot less fragile.

Bonus points for writing useful documentation for the new bip_set_seed.