Re: [PATCH v2 8/8] block: add WARN() in bio_split() for sector alignment

2021-04-15 Thread Eric Biggers
On Thu, Mar 25, 2021 at 09:26:09PM +, Satya Tangirala wrote: > The number of sectors passed to bio_split() should be aligned to > bio_required_sector_alignment(). All callers (other than bounce.c) have > been updated to ensure this, so add a WARN() if the number of sectors is > not aligned. (bo

Re: [PATCH v2 8/8] block: add WARN() in bio_split() for sector alignment

2021-03-25 Thread Bart Van Assche
On 3/25/21 2:26 PM, Satya Tangirala wrote: > @@ -1458,6 +1458,7 @@ struct bio *bio_split(struct bio *bio, int sectors, > > BUG_ON(sectors <= 0); > BUG_ON(sectors >= bio_sectors(bio)); > + WARN_ON(!IS_ALIGNED(sectors, bio_required_sector_alignment(bio))); Please change this WARN_O

[PATCH v2 8/8] block: add WARN() in bio_split() for sector alignment

2021-03-25 Thread Satya Tangirala
The number of sectors passed to bio_split() should be aligned to bio_required_sector_alignment(). All callers (other than bounce.c) have been updated to ensure this, so add a WARN() if the number of sectors is not aligned. (bounce.c was not updated since it's legacy code that won't interact with in