Re: [PATCH v2] block: Improve limiting the bio size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi Jens/Bart
> CKI reproduced the boot panic issue again with the latest
> linux-block/for-next[1] today, then I checked the patch 'bio: limit
> bio max size'[2] found Bart's fix patch does not fold in that commit,
> could you help recheck it, thanks.
> 
> [1]
> Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
> Commit: ffa77af5731d - Merge branch 'for-5.13/io_uring'
> into for-next
> [2] bio: limit bio max size
> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=for-next&id=42fb54fbc7072da505c1c59cbe9f8417feb37c27
> 
> Thanks
> Yi
> >
> > Since I had to shuffle patches anyway, I folded in this fix. Thanks
> > Bart.
> >
> > --
> > Jens Axboe
> >

Should we check queue point in bio_max_size()?
__device_add_disk() can be called with "register_queue=false" like as
device_add_disk_no_queue_reg(). How about below?

unsigned int bio_max_size(struct bio *bio)
{
	struct request_queue *q;

	q = (bio->bi_bdev) ? bio->bi_bdev->bd_disk->queue : NULL;
	return q ? q->limits.bio_max_bytes : UINT_MAX;
}



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux