Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt for kernel 6.14 #100

Open
mike2307 opened this issue Mar 20, 2025 · 2 comments
Open

Adapt for kernel 6.14 #100

mike2307 opened this issue Mar 20, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@mike2307
Copy link

Description

The flag BLK_MQ_F_SHOULD_MERGE was removed in kernel 6.14 (see https://lore.kernel.org/linux-block/6880f851-bb7c-40a7-b405-ee9134b8bb1c@oracle.com/T/).
This shall be adapted in file snapimage.c

Usage tips

  • Please use the 👍 reaction to show that you are interested into this.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this.
  • Subscribe to receive notifications on status change and new comments, you can do also without add comment.
@mike2307 mike2307 added the enhancement New feature or request label Mar 20, 2025
@SergeiShtepa
Copy link
Collaborator

Yes.
This is a change in the 6.14 kernel, which still has RC status.
Of course, we plan to support it in one of the future releases.

diff --git a/module/Makefile-config b/module/Makefile-config
index d3e9a9a..8147f7d 100644
--- a/module/Makefile-config
+++ b/module/Makefile-config
@@ -86,4 +86,6 @@ EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blkdev.h &&		\
 	grep -qw "void blk_queue_max_hw_sectors" $(srctree)/include/linux/blkdev.h &&	\
 		echo -D HAVE_BLK_QUEUE_MAX_HW_SECTORS)
-
+EXTRA_CFLAGS += $(shell test -f $(srctree)/include/linux/blk-mq.h &&		\
+	grep -qw "BLK_MQ_F_SHOULD_MERGE" $(srctree)/include/linux/blk-mq.h &&	\
+		echo -D HAVE_BLK_MQ_F_SHOULD_MERGE)
diff --git a/module/snapimage.c b/module/snapimage.c
index 0635636..bb0ca05 100644
--- a/module/snapimage.c
+++ b/module/snapimage.c
@@ -176,7 +176,11 @@ static inline int snapimage_alloc_tag_set(struct snapimage *snapimage)
 	set->nr_maps = 1;
 	set->queue_depth = 128;
 	set->numa_node = NUMA_NO_NODE;
+#ifdef HAVE_BLK_MQ_F_SHOULD_MERGE
 	set->flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_STACKING;
+#else
+	set->flags = BLK_MQ_F_STACKING;
+#endif
 
 	set->cmd_size = sizeof(struct snapimage_cmd);
 	set->driver_data = snapimage;

@Sfinx
Copy link

Sfinx commented Mar 24, 2025

Got this at 6.14 while modprobe veeamblksnap:

bdevfilter: Failed to register ftrace handler (-16)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants