https://github.com/torvalds/linux
Revision 15b94a690470038aa08247eedbebbe7e2218d5ee authored by Junichi Nomura on 29 May 2015, 08:51:03 UTC, committed by Mike Snitzer on 29 May 2015, 17:41:16 UTC
dm-multipath accepts 0 path mapping.

  # echo '0 2097152 multipath 0 0 0 0' | dmsetup create newdev

Such a mapping can be used to release underlying devices while still
holding requests in its queue until working paths come back.

However, once the multipath device is created over blk-mq devices,
it rejects reloading of 0 path mapping:

  # echo '0 2097152 multipath 0 0 1 1 queue-length 0 1 1 /dev/sda 1' \
      | dmsetup create mpath1
  # echo '0 2097152 multipath 0 0 0 0' | dmsetup load mpath1
  device-mapper: reload ioctl on mpath1 failed: Invalid argument
  Command failed

With following kernel message:
  device-mapper: ioctl: can't change device type after initial table load.

DM tries to inherit the current table type using dm_table_set_type()
but it doesn't work as expected because of unnecessary check about
whether the target type is hybrid or not.

Hybrid type is for targets that work as either request-based or bio-based
and not required for blk-mq or non blk-mq checking.

Fixes: 65803c205983 ("dm table: train hybrid target type detection to select blk-mq if appropriate")
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent e5d8de3
History
Tip revision: 15b94a690470038aa08247eedbebbe7e2218d5ee authored by Junichi Nomura on 29 May 2015, 08:51:03 UTC
dm: fix reload failure of 0 path multipath mapping on blk-mq devices
Tip revision: 15b94a6
File Mode Size
Makefile -rw-r--r-- 377 bytes
compat.c -rw-r--r-- 19.1 KB
compat_mq.c -rw-r--r-- 3.9 KB
ipc_sysctl.c -rw-r--r-- 5.4 KB
mq_sysctl.c -rw-r--r-- 2.9 KB
mqueue.c -rw-r--r-- 35.3 KB
msg.c -rw-r--r-- 23.2 KB
msgutil.c -rw-r--r-- 3.6 KB
namespace.c -rw-r--r-- 4.0 KB
sem.c -rw-r--r-- 55.2 KB
shm.c -rw-r--r-- 32.5 KB
syscall.c -rw-r--r-- 2.3 KB
util.c -rw-r--r-- 21.1 KB
util.h -rw-r--r-- 6.4 KB

back to top