All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dm mpath: fail message ioctl if specified path is not valid
@ 2011-01-31 16:14 Mike Snitzer
  2011-01-31 16:14 ` [PATCH 2/2] dm mpath: allow table load with 0 priority groups Mike Snitzer
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Snitzer @ 2011-01-31 16:14 UTC (permalink / raw)
  To: dm-devel; +Cc: Mike Snitzer

The message ioctl would succeed for the 'reinistate_path' and
'fail_path' messages even if action was not taken because the
specified device was not a valid path of the multipath device.

before:
$ dmsetup message mpathb 0 reinstate_path /dev/vdb
$ echo $?
0

after:
$ dmsetup message mpathb 0 reinstate_path /dev/vdb
device-mapper: message ioctl failed: Invalid argument
Command failed
$ echo $?
1

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
 drivers/md/dm-mpath.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index b82d288..97842c6 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1065,7 +1065,7 @@ out:
 static int action_dev(struct multipath *m, struct dm_dev *dev,
 		      action_fn action)
 {
-	int r = 0;
+	int r = -EINVAL;
 	struct pgpath *pgpath;
 	struct priority_group *pg;
 
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-02-11 15:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-31 16:14 [PATCH 1/2] dm mpath: fail message ioctl if specified path is not valid Mike Snitzer
2011-01-31 16:14 ` [PATCH 2/2] dm mpath: allow table load with 0 priority groups Mike Snitzer
2011-01-31 18:09   ` Moger, Babu
2011-01-31 18:34     ` [RFC PATCH] multipathd: use 0 for initial pg if nr_priority_groups=0 (was: Re: [PATCH 2/2] dm mpath: allow table load with 0 priority groups) Mike Snitzer
2011-02-01 15:38       ` [RFC PATCH] multipathd: use 0 for initial pg if nr_priority_groups=0 Hannes Reinecke
2011-02-10 22:00         ` Mike Snitzer
2011-02-11 15:44           ` Hannes Reinecke
2011-02-01 15:40   ` [PATCH 2/2] dm mpath: allow table load with 0 priority groups Hannes Reinecke
2011-02-10 21:06   ` [PATCH 2/2 v2] " Mike Snitzer
2011-02-10 21:13     ` Mike Snitzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.