HomeFreeBSD

Linux 5.15 compat: block device readahead

Description

Linux 5.15 compat: block device readahead

The 5.15 kernel moved the backing_dev_info structure out of
the request queue structure which causes a build failure.

Rather than look in the new location for the BDI we instead
detect this upstream refactoring by the existance of either
the blk_queue_update_readahead() or disk_update_readahead()
functions. In either case, there's no longer any reason to
manually set the ra_pages value since it will be overridden
with a reasonable default (2x the block size) when
blk_queue_io_opt() is called.

Therefore, we update the compatibility wrapper to do nothing
for 5.9 and newer kernels. While it's tempting to do the
same for older kernels we want to keep the compatibility
code to preserve the existing behavior. Removing it would
effectively increase the default readahead to 128k.

Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12532

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Sep 8 2021, 3:03 PM
Tony Hutter <hutter2@llnl.gov>Committed on Sep 14 2021, 10:41 PM
Parents
rG6ca1f307082c: Detect iSCSI in the zpool cmd vdev media script
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rGad8dc99ed267: Linux 5.15 compat: block device readahead (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Sep 14 2021, 10:41 PM