All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] multipath-tools: Remove the limitation of IPC command reply length.
@ 2017-08-16 12:34 Gris Ge
  2017-08-16 12:34 ` [PATCH 2/3] multipath-tools: libdmmp: Improve timeout mechanism Gris Ge
  0 siblings, 1 reply; 5+ messages in thread
From: Gris Ge @ 2017-08-16 12:34 UTC (permalink / raw)
  To: dm-devel; +Cc: Gris Ge

Issue:
    libmpathcmd will reply error 22(Invalid argument) when having 1000
    mpath.

Root cause:
    libmpathcmd return error when reply string length exceeded the 65535.

Fix:
    Remove the limitation on reply data length.

Extra:
    Initially this limitation was removed and improved by commit
    bb219efb131aef61c331f181193bf1d80e6b2a99
    but then was added back via commit
    7381c3f2b19903cc56d1ddafb13e8ad3afc08580

Signed-off-by: Gris Ge <fge@redhat.com>
---
 libmpathcmd/mpath_cmd.c | 4 ----
 libmpathcmd/mpath_cmd.h | 1 -
 2 files changed, 5 deletions(-)

diff --git a/libmpathcmd/mpath_cmd.c b/libmpathcmd/mpath_cmd.c
index 1496b682..af618cff 100644
--- a/libmpathcmd/mpath_cmd.c
+++ b/libmpathcmd/mpath_cmd.c
@@ -142,10 +142,6 @@ int mpath_recv_reply(int fd, char **reply, unsigned int timeout)
 	len = mpath_recv_reply_len(fd, timeout);
 	if (len <= 0)
 		return len;
-	if (len > MAX_REPLY_LEN) {
-		errno = EINVAL;
-		return -1;
-	}
 	*reply = malloc(len);
 	if (!*reply)
 		return -1;
diff --git a/libmpathcmd/mpath_cmd.h b/libmpathcmd/mpath_cmd.h
index 6534474c..b57b708b 100644
--- a/libmpathcmd/mpath_cmd.h
+++ b/libmpathcmd/mpath_cmd.h
@@ -26,7 +26,6 @@ extern "C" {
 
 #define DEFAULT_SOCKET		"/org/kernel/linux/storage/multipathd"
 #define DEFAULT_REPLY_TIMEOUT	4000
-#define MAX_REPLY_LEN		65536
 
 
 /*
-- 
2.14.1

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

end of thread, other threads:[~2017-08-28 12:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16 12:34 [PATCH 1/3] multipath-tools: Remove the limitation of IPC command reply length Gris Ge
2017-08-16 12:34 ` [PATCH 2/3] multipath-tools: libdmmp: Improve timeout mechanism Gris Ge
2017-08-16 12:34   ` [PATCH 3/3] multipath-tools: libdmmp: New function to flush and reconfig Gris Ge
2017-08-17 21:29   ` [PATCH 2/3] multipath-tools: libdmmp: Improve timeout mechanism Martin Wilck
2017-08-28 12:58     ` Gris Ge

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.