On 7/8/25 2:57 AM, Christoph Hellwig wrote:
That still doesn't make it sensible to keep the q usage counter
elevator for unlimited time. See nvme multipath for how we can keep
bios around forever without elevating the usage counter which is
supposed to be transient. Note that dm-multipath should in fact
already be doing the right thing in bio based mode as well.
This blktests patch should be sufficient to switch from rq-based to
bio-based dm-multipathing:
diff --git a/common/multipath-over-rdma b/common/multipath-over-rdma
index e157e0a19560..167428b1f53e 100644
--- a/common/multipath-over-rdma
+++ b/common/multipath-over-rdma
@@ -267,7 +267,7 @@ mpath_has_stale_dev() {
# Check whether multipath definition $1 includes the queue_if_no_path
keyword.
is_qinp_def() {
case "$1" in
- *" 3 queue_if_no_path queue_mode mq "*)
+ *" 3 queue_if_no_path queue_mode "*)
return 0;;
*" 1 queue_if_no_path "*)
return 0;;
diff --git a/tests/srp/multipath.conf b/tests/srp/multipath.conf
index e0da32e29917..dffea925466f 100644
--- a/tests/srp/multipath.conf
+++ b/tests/srp/multipath.conf
@@ -8,6 +8,7 @@ devices {
vendor "LIO-ORG|SCST_BIO|FUSIONIO"
product ".*"
no_path_retry queue
+ queue_mode bio
path_checker tur
}
}
With the above patch applied, the following deadlock is triggered by the
SRP tests:
Call Trace:
<TASK>
__schedule+0x8c1/0x1be0
schedule+0xdd/0x270
schedule_preempt_disabled+0x1c/0x30
__mutex_lock+0xb89/0x1650
mutex_lock_nested+0x1f/0x30 <- queue_limits_start_update()
dm_table_set_restrictions+0x823/0xdf0
__bind+0x166/0x5a0
dm_swap_table+0x2a7/0x490
do_resume+0x1b1/0x610
dev_suspend+0x55/0x1a0
ctl_ioctl+0x3a5/0x810
dm_ctl_ioctl+0x12/0x20
__x64_sys_ioctl+0x127/0x1a0
x64_sys_call+0xe2b/0x17d0
do_syscall_64+0x96/0x3a0
entry_SYSCALL_64_after_hwframe+0x4b/0x53
task:(udev-worker) state:D stack:27360 pid:8369 tgid:8369 ppid:1758
task_flags:0x480140 flags:0x00004002
Call Trace:
<TASK>
__schedule+0x8c1/0x1be0
schedule+0xdd/0x270
blk_mq_freeze_queue_wait+0xf2/0x140
blk_mq_freeze_queue_nomemsave+0x23/0x30
queue_ra_store+0x14e/0x290
queue_attr_store+0x23e/0x2c0
sysfs_kf_write+0xde/0x140
kernfs_fop_write_iter+0x3b2/0x630
vfs_write+0x4fd/0x1390
ksys_write+0xfd/0x230
__x64_sys_write+0x76/0xc0
x64_sys_call+0x276/0x17d0
do_syscall_64+0x96/0x3a0
entry_SYSCALL_64_after_hwframe+0x4b/0x53
Thanks,
Bart.