[Devel] [PATCH rh7 1/2] ve: increase max length of ve.mount_opts string
Kirill Tkhai
ktkhai at virtuozzo.com
Mon Jun 26 18:59:36 MSK 2017
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 at virtuozzo.com>
Reviewed-by: Kirill Tkhai <ktkhai at 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
>
More information about the Devel
mailing list