[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openvz-devel
Subject:    Re: [Devel] [PATCH rh7 1/2] ve: increase max length of ve.mount_opts string
From:       Kirill Tkhai <ktkhai () virtuozzo ! com>
Date:       2017-06-26 15:59:36
Message-ID: 20170626155933.bklt2v6h5u7qe3ff () virtuozzo ! com
[Download RAW message or body]

On Mon, Jun 26, 2017 at 15:51, Konstantin Khorenko wrote:
> Default max string length for cgroup file is
> CGROUP_LOCAL_BUFFER_SIZE == 64
> 
> which is not enough for allow quota options for example:
> echo "0 7:1;1 aaa;2 usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0;" > \
>                 /sys/fs/cgroup/ve/100/ve.mount_opts
> -bash: echo: write error: Argument list too long
> 
> So increase the max limit to 256 for now.
> 
> https://jira.sw.ru/browse/PSBM-40075
> 
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>

Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>

> ---
> kernel/ve/ve.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
> index 7cb47fa..0533d79 100644
> --- a/kernel/ve/ve.c
> +++ b/kernel/ve/ve.c
> @@ -1039,6 +1039,7 @@ static int ve_mount_opts_release(struct inode *inode, struct \
>                 file *file)
> * consisting of substrings separated by MNTOPT_DELIM.
> */
> #define MNTOPT_DELIM ';'
> +#define MNTOPT_MAXLEN 256
> 
> /*
> * Each substring has the form of "<type> <comma-separated-list-of-options>"
> @@ -1418,6 +1419,7 @@ static struct cftype ve_cftypes[] = {
> 	},
> 	{
> 		.name			= "mount_opts",
> +		.max_write_len		= MNTOPT_MAXLEN,
> 		.flags			= CFTYPE_NOT_ON_ROOT,
> 		.open			= ve_mount_opts_open,
> 		.read			= ve_mount_opts_read,
> -- 
> 1.8.3.1
> 
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic