Kernel bio layer is sending bio size more than our block device is capable of handling

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Kernel bio layer is sending bio size more than our block device is capable of handling

Umesh Patel
This post has NOT been accepted by the mailing list yet.
Hello,

We are registering bio size of our device with linux kernel with below available kernel API.  blk_queue_max_hw_sectors(dev->osdev.queue, (dev->aggr_max_size >> KERNEL_SECTOR_SHIFT));.

Max size of bio that our block device can handle is 106496 bytes (104KB) but linux block device is sending 262144  bytes (256 KB) which is more than we are registering with kernel.

This issue we are observing in 4.4.0-59-generic kernel version. Until this we had not seen this issue.
So does anything extra require to tell linux kernel or anything else need to register ?


Thanks
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Kernel bio layer is sending bio size more than our block device is capable of handling

Umesh Patel
This post has NOT been accepted by the mailing list yet.
From the kernel source code i came to know below things.

4.1 kernel version onward
""nr_pages = min(sdio->pages_in_io, bio_get_nr_vecs(map_bh->b_bdev))"" line has been removed which was considering max_sectors_kb of queue.

Now new code is something like this "nr_pages = min(sdio->pages_in_io, BIO_MAX_PAGES)", which is sending 256 bytes of data to our device which we are not supporting.

Please let me know is there any other place where i can register my max_sectors_kb to kernel.
Loading...