Re: [PATCH V3 1/3] multipath-tools: Increase MAX_REPLY_LEN.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/01/2016 02:46 PM, Gris Ge wrote:
> 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@xxxxxxxxxx>
> ---
>  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 */
>  
>  
Huh.
Can't say I like it. The limit is pretty much self-imposed, so I'd
rather bite the bullet and make it size-independent.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux