[dm-devel] [PATCH V3 1/3] multipath-tools: Increase MAX_REPLY_LEN.
Gris Ge
fge at redhat.com
Fri Jul 1 12:46:54 UTC 2016
Problem:
mpath_recv_reply() return -EINVA with 2k paths.
Root cause:
With 2k paths(1k mpaths) simulated by scsi_debug, the 'show maps json'
requires 1633217 bytes while MAX_REPLY_LEN is 65535 bytes.
Fix:
Increase MAX_REPLY_LEN to 10485760(10MiB) which is enough for 10k
paths.
Signed-off-by: Gris Ge <fge at redhat.com>
---
libmpathcmd/mpath_cmd.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libmpathcmd/mpath_cmd.h b/libmpathcmd/mpath_cmd.h
index f33f000..d65c648 100644
--- a/libmpathcmd/mpath_cmd.h
+++ b/libmpathcmd/mpath_cmd.h
@@ -28,7 +28,9 @@ extern "C" {
#define DEFAULT_SOCKET "/org/kernel/linux/storage/multipathd"
#define DEFAULT_REPLY_TIMEOUT 1000
-#define MAX_REPLY_LEN 65536
+#define MAX_REPLY_LEN 10485760
+/* ^ 10 MiB, enough for 'show maps json' command with 10k paths which
+ * requires about 8 MiB */
/*
--
2.9.0
More information about the dm-devel
mailing list