block: virtual-storage: Fix build for Linux v6.9

In Linux v6.9-rc1, the function blk_mq_init_queue() was renamed
blk_mq_alloc_queue() and the arguments passed to the function were
updated. Add a test to conftest to detect if the function
blk_mq_alloc_queue() is present and update the virtual-storage driver
accordingly.

Bug 4471899

Change-Id: I7dc937eaad27445b1c140c57aafd36f4a4b769ba
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095926
(cherry picked from commit 3b9f5783b2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104377
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2024-03-13 23:05:01 +00:00
committed by mobile promotions
parent 4e544f3b3a
commit 6969153c7c
3 changed files with 25 additions and 4 deletions

View File

@@ -6507,6 +6507,24 @@ compile_test() {
compile_check_conftest "$CODE" "NV_BLK_MQ_ALLOC_DISK_FOR_QUEUE_PRESENT" "" "functions"
;;
blk_mq_alloc_queue)
#
# Determine if function blk_mq_alloc_queue() is present.
#
# In Linux next-20240308, commit 9ac4dd8c47d5 ("block: pass a
# queue_limits argument to blk_mq_init_queue") renames the function
# blk_mq_init_queue() to blk_mq_alloc_queue() and updates the
# arguments passed.
#
CODE="
#include <linux/blk-mq.h>
void conftest_blk_mq_alloc_queue(void) {
blk_mq_alloc_queue();
}"
compile_check_conftest "$CODE" "NV_BLK_MQ_ALLOC_QUEUE_PRESENT" "" "functions"
;;
blk_mq_destroy_queue)
#
# Determine whether function blk_mq_destroy_queue() is present.