]> git.proxmox.com Git - mirror_zfs.git/commit
zvol_os: fix compile with blk-mq on Linux 4.x
authorRob N <rob.norris@klarasystems.com>
Mon, 8 Apr 2024 18:38:49 +0000 (04:38 +1000)
committerGitHub <noreply@github.com>
Mon, 8 Apr 2024 18:38:49 +0000 (11:38 -0700)
commit03987f71e39c47d2f16c3006d690c50a9fec2ca5
treedcffd5e0ec3be6a223ccf8e9c7d02d535a8227c2
parentc13400c9a26985fe817bc777fc0bbb5459bedeaf
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
config/kernel-blk-queue.m4
module/os/linux/zfs/zvol_os.c