Skip to content

Commit

Permalink
dm mpath: reject messages when device is suspended
Browse files Browse the repository at this point in the history
This patch rejects messages that can generate I/O while the device
itself is suspended.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Cc: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Kiyoshi Ueda authored and Alasdair G Kergon committed Dec 10, 2009
1 parent 64dbce5 commit c2f3d24
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,11 @@ static int multipath_message(struct dm_target *ti, unsigned argc, char **argv)
goto out;
}

if (dm_suspended(ti)) {
r = -EBUSY;
goto out;
}

if (argc == 1) {
if (!strnicmp(argv[0], MESG_STR("queue_if_no_path"))) {
r = queue_if_no_path(m, 1, 0);
Expand Down

0 comments on commit c2f3d24

Please sign in to comment.