On 4/26/21 1:34 AM, Changheun Lee wrote:
quoted
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.
__device_add_disk() do not call bio_max_size(). I just imagined bio
operation on disk without request queue. Disk can be added without queue via
device_add_disk_no_queue_reg(). It might be my miss-understood about it.
I didn't check bio operation is possible on disk without request queue yet.
Thanks,
Changheun Lee.