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

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

 



On 4/26/21 1:34 AM, Changheun Lee wrote:
> 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;
> }

How could bio_max_size() get called from inside __device_add_disk() if
no request queue is registered? Did I perhaps miss something?

Thanks,

Bart.





[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