Hi Hannes, > @@ -309,8 +311,8 @@ static void brd_submit_bio(struct bio *bio) > int err; I think you missed the conversion from "kernel" logical sectors to the device logical sector here: sector_t sector = bio->bi_iter.bi_sector >> (brd->brd_logical_sector_shift - SECTOR_SHIFT); This fixes the issue when you try to do a fio with -verify on a 4k logical and physical block size. > > /* Don't support un-aligned buffer */ > - WARN_ON_ONCE((iter.offset & (SECTOR_SIZE - 1)) || > - (len & (SECTOR_SIZE - 1))); > + WARN_ON_ONCE((iter.offset & (brd->brd_logical_sector_size - 1)) || > + (len & (brd->brd_logical_sector_size - 1))); > > err = brd_do_folio(brd, iter.folio, len, iter.offset, > bio->bi_opf, sector); > @@ -322,7 +324,7 @@ static void brd_submit_bio(struct bio *bio) > bio_io_error(bio); > return; > } > - sector += len >> SECTOR_SHIFT; > + sector += len >> brd->brd_logical_sector_shift; As you can see here, you divide the len with device logical block size to go to the next sector. > } > > bio_endio(bio);