HomeFreeBSD

zvol_os: fix compile with blk-mq on Linux 4.x

Description

zvol_os: fix compile with blk-mq on Linux 4.x

99741bde5 accesses a cached blk-mq hardware context through the mq_hctx
field of struct request. However, this field did not exist until 5.0.
Before that, the private function blk_mq_map_queue() was used to dig it
out of broader queue context. This commit detects this situation, and
handles it with a poor-man's simulation of that function.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16069

Details

Provenance
rob.norris_klarasystems.comAuthored on Apr 8 2024, 6:38 PM
GitHub <noreply@github.com>Committed on Apr 8 2024, 6:38 PM
Parents
rGc13400c9a269: zvol_os: fix build on Linux <3.13
Branches
Unknown
Tags
Unknown