diff options
author | Jose Castillo <jcastillo@redhat.com> | 2014-01-29 11:52:45 -0500 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2014-03-27 16:56:25 -0400 |
commit | a356e42620271deb5afb6570606154d160783bba (patch) | |
tree | d6a7fcc0cc7da081ebdaf2f73bafa06b5a373b23 /drivers/md/dm-mpath.c | |
parent | 3a0175096423856d145e210527271c9eec188a5f (diff) |
dm mpath: print more useful warnings in multipath_message()
The warning message "Unrecognised multipath message received" is
displayed in two different situations in multipath_message(): when the
number of arguments passed is invalid and when the string passed in
argv[0] is not recognized.
Make it easier to identify where the problem is by making these warnings
more specific with additional context for each case.
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r-- | drivers/md/dm-mpath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index b1fb01efd56c..aa009e865871 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -1478,7 +1478,7 @@ static int multipath_message(struct dm_target *ti, unsigned argc, char **argv) | |||
1478 | } | 1478 | } |
1479 | 1479 | ||
1480 | if (argc != 2) { | 1480 | if (argc != 2) { |
1481 | DMWARN("Unrecognised multipath message received."); | 1481 | DMWARN("Invalid multipath message arguments. Expected 2 arguments, got %d.", argc); |
1482 | goto out; | 1482 | goto out; |
1483 | } | 1483 | } |
1484 | 1484 | ||
@@ -1496,7 +1496,7 @@ static int multipath_message(struct dm_target *ti, unsigned argc, char **argv) | |||
1496 | else if (!strcasecmp(argv[0], "fail_path")) | 1496 | else if (!strcasecmp(argv[0], "fail_path")) |
1497 | action = fail_path; | 1497 | action = fail_path; |
1498 | else { | 1498 | else { |
1499 | DMWARN("Unrecognised multipath message received."); | 1499 | DMWARN("Unrecognised multipath message received: %s", argv[0]); |
1500 | goto out; | 1500 | goto out; |
1501 | } | 1501 | } |
1502 | 1502 | ||