From: Jose Castillo Date: Wed, 29 Jan 2014 16:52:45 +0000 (+0100) Subject: dm mpath: print more useful warnings in multipath_message() X-Git-Tag: firefly_0821_release~176^2~3962^2~10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a356e42620271deb5afb6570606154d160783bba;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Mike Snitzer --- 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) } if (argc != 2) { - DMWARN("Unrecognised multipath message received."); + DMWARN("Invalid multipath message arguments. Expected 2 arguments, got %d.", argc); goto out; } @@ -1496,7 +1496,7 @@ static int multipath_message(struct dm_target *ti, unsigned argc, char **argv) else if (!strcasecmp(argv[0], "fail_path")) action = fail_path; else { - DMWARN("Unrecognised multipath message received."); + DMWARN("Unrecognised multipath message received: %s", argv[0]); goto out; }