Skip to content

Commit 3266d4d

Browse files
robnixhamza
authored andcommitted
Linux 6.14: BLK_MQ_F_SHOULD_MERGE was removed
According to the upstream change, all callers set it, and all block devices either honoured it or ignored it, so removing it entirely allows a bunch of handling for the "unset" case to be removed, and it becomes effectively implied. We follow suit, and keep setting it for older kernels. Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Tony Hutter <[email protected]>
1 parent 51bec16 commit 3266d4d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

module/os/linux/zfs/zvol_os.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,16 @@ static int zvol_blk_mq_alloc_tag_set(zvol_state_t *zv)
202202
* We need BLK_MQ_F_BLOCKING here since we do blocking calls in
203203
* zvol_request_impl()
204204
*/
205-
zso->tag_set.flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_BLOCKING;
205+
zso->tag_set.flags = BLK_MQ_F_BLOCKING;
206+
207+
#ifdef BLK_MQ_F_SHOULD_MERGE
208+
/*
209+
* Linux 6.14 removed BLK_MQ_F_SHOULD_MERGE and made it implicit.
210+
* For older kernels, we set it.
211+
*/
212+
zso->tag_set.flags |= BLK_MQ_F_SHOULD_MERGE;
213+
#endif
214+
206215
zso->tag_set.driver_data = zv;
207216

208217
return (blk_mq_alloc_tag_set(&zso->tag_set));

0 commit comments

Comments
 (0)