Message ID | 1391014365-4180-1-git-send-email-jcastillo@redhat.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Mike Snitzer |
Headers | show |
On Wed, Jan 29 2014 at 11:52am -0500, Jose Castillo <jcastillo@redhat.com> wrote: > The following warning message "Unrecognised multipath message received" is displayed > in two different situations inside the function multipath_message: when > the number of arguments passed is invalid and when the string passed in argv[0] > is not recognized. With this patch, both warnings are more specific to each case > and is easier to identify where the problem is. > > Signed-off-by: Jose Castillo <jcastillo@redhat.com> Hi Jose, I've picked this patch up for 3.15. It is staged in the 'for-next' branch of linux-dm.git, see: https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=4a5f0cfea2ba2d765f29f3951e3b993fc76206b2 Thanks, Mike -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 6eb9dc9..95c4044 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -1552,7 +1552,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; } @@ -1570,7 +1570,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; }
The following warning message "Unrecognised multipath message received" is displayed in two different situations inside the function multipath_message: when the number of arguments passed is invalid and when the string passed in argv[0] is not recognized. With this patch, both warnings are more specific to each case and is easier to identify where the problem is. Signed-off-by: Jose Castillo <jcastillo@redhat.com> --- drivers/md/dm-mpath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)