All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] dm-multipath: Print more explicit warnings when dealing with multipath messages
@ 2014-01-29 16:52 Jose Castillo
  2014-03-12 22:08 ` Mike Snitzer
  0 siblings, 1 reply; 2+ messages in thread
From: Jose Castillo @ 2014-01-29 16:52 UTC (permalink / raw)
  To: device-mapper development

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(-)

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;
 	}
 
-- 
1.8.4.2

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

* Re: [RFC PATCH] dm-multipath: Print more explicit warnings when dealing with multipath messages
  2014-01-29 16:52 [RFC PATCH] dm-multipath: Print more explicit warnings when dealing with multipath messages Jose Castillo
@ 2014-03-12 22:08 ` Mike Snitzer
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Snitzer @ 2014-03-12 22:08 UTC (permalink / raw)
  To: Jose Castillo; +Cc: device-mapper development

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

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

end of thread, other threads:[~2014-03-12 22:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29 16:52 [RFC PATCH] dm-multipath: Print more explicit warnings when dealing with multipath messages Jose Castillo
2014-03-12 22:08 ` 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.