HomeFreeBSD

Linux 5.16: bio_set_dev is no longer a helper macro

Description

Linux 5.16: bio_set_dev is no longer a helper macro

This change adds a confiugre check to determine if bio_set_dev is a
helper macro or not. If not, then the attempt to override its internal
call to bio_associate_blkg(), with a macro definition to our own
version, is no longer possible, as the compiler won't use it when
compiling the new inline function replacement implemented in the header.
This change also creates a new vdev_bio_set_dev() function that performs
the same work, and also performs the work implemented in
vdev_bio_associate_blkg(), as it is the only thing calling that function
in our code. Our custom vdev_bio_associate_blkg() is now only compiled
if the bio_set_dev() is a macro in the Linux headers.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes #12819

Details

Provenance
Coleman Kane <ckane@colemankane.org>Authored on Dec 4 2021, 2:45 AM
Tony Hutter <hutter2@llnl.gov>Committed on Dec 7 2021, 9:14 PM
Parents
rG9519fe1ff830: Linux 5.16: type member of iov_iter renamed iter_type
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rGea61e074132f: Linux 5.16: bio_set_dev is no longer a helper macro (authored by Coleman Kane <ckane@colemankane.org>).Dec 7 2021, 9:14 PM