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

Caleb Sander Mateos
2026-04-07T16:49:04Z

On Sun, Apr 5, 2026 at 11:35 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> 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.

Perhaps I'm misunderstanding the suggestion, but how would that work
for initializing the seed from struct uio_meta in
bio_integrity_map_iter()?

bip_set_seed(bio_integrity(bio), meta->seed);

Thanks,
Caleb