Re: Why is the length of max mount option a page size??

2018-05-30 Thread Jungsub Shin
On Wed, May 30, 2018 at 11:40:27AM +0900, J. R. Okajima wrote:
> Jungsub Shin:
> > Do you mean using symlinks or bind mount to reduce length of mount
> > options?? I can remove "~/tca_agent/image_layer_dir" string. But the
> > other character means unique ID of layer and i can't compress it or
> > replace it to another string. This is not fundamental solution. Docker=20
> 
> Can't it be a solution?
> 
> # mount -o bind /long/path0 /br0
> # mount -o bind /long/path1 /br1
>   :::
> # mount -t aufs -o br=/br0:/br1:... none /mntpnt
> 
> or
> 
> # ln -s /long/path0 /br0
> # ln -s /long/path1 /br1
>   :::
> # mount -t aufs -o br=/br0:/br1:... none /mntpnt
> 
> 
> J. R. Okajima

I don't test them, but they will work well.
That's temporary solution. So i'm use remount,append option.

Thanks



Re: Why is the length of max mount option a page size??

2018-05-28 Thread Jungsub Shin
On Tue, May 29, 2018 at 02:14:12AM +0100, Al Viro wrote:
> On Tue, May 29, 2018 at 09:24:56AM +0900, Jungsub Shin wrote:
> > Mount command : mount -t aufs -o 
> > br=~/tca_agent/container_rw_dir/51509032=rw:~/tca_agent/image_layer_dir/5a259d94211e449fd466d997b5b0b149cb2997a732fd3a838c14295e0eb93f92=ro+wh:~/tca_agent/image_layer_dir/faca908333f884648b75738571879df977339ee7615c65410c98001a463bcd00=ro+wh:~/tca_agent/image_layer_dir/67b50813aedeb67fd06b434163fa64d07fbd16f714196daea1cd139a0171b080=ro+wh:~/tca_agent/image_layer_dir/28b6f7699be037b7f80dd03b22830712aa75b88ddfbba0910dd059b522fbff20=ro+wh:~/tca_agent/image_layer_dir/c47c7125efa9172d262c5b3645594010704f67cf44005da9f6d7ea5a5d2a05db=ro+wh:~/tca_agent/image_layer_dir/b91ed1b448ac52d251c785f5cfc299ca3ba4cfd68d739832b766228afa84a651=ro+wh:~/tca_agent/image_layer_dir/0169cd8bc0bdbecedb30c7d995e69e832d7ccd5c435e72c40af6940db87851b7=ro+wh:~/tca_agent/image_layer_dir/e7ef7d443e31f8b3b8a0a002a6895746d3737289eb2eea18d669924c089279f2=ro+wh:~/tca_agent/image_layer_dir/31bfb0cd724fda09280305b8dc1c4b0587ca01f5dd503d28afa82cff4fa92475=ro+wh:~/tca_agent/image_layer_dir/74428f0d76521fa9b9b1189cb72d303e367003c113cc8a11db125e3f7df1daa1=ro+wh:~/tca_agent/image_layer_dir/b20a927da14045cac0cd6a745f67fdeb88ead6d85752c670ea2773b27387f6ae=ro+wh:~/tca_agent/image_layer_dir/7dee3bce119631e3c922d78860d6b0ae160e237b63bf19f43713a05d1086c72f=ro+wh:~/tca_agent/image_layer_dir/636bce8f18e8734cb98f170bdcf1fb9ae52f1b091bfadcb2bef378b0d829ceb6=ro+wh:~/tca_agent/image_layer_dir/9c6fde234e701cf7b61534ef3a23cc4e0cdb6d3ffc497feaa8fcddc52e8d1fda=ro+wh:~/tca_agent/image_layer_dir/83c2f1968a932e3e284ef20b10a4ef8a9cfc01589dacf2100fb9a78e88c3888e=ro+wh:~/tca_agent/image_layer_dir/ec096a351601040fcd37c31edccd2f68106438097e8adf7253539366b2232de5=ro+wh:~/tca_agent/image_layer_dir/6de889accecb819028355196bde150749598e982b5dfe556540e102c737bfc34=ro+wh:~/tca_agent/image_layer_dir/1042cb8f2263d1030fdb57e0ca671b34a2180bb35d9448737e4a03e4987cf942=ro+wh:~/tca_agent/image_layer_dir/4fab8c997a447af2375e325467661ca1d74bf62dc6d802426f20d0134c9c43bc=ro+wh:~/tca_agent/image_layer_dir/ca57efb1c28464fab46af1826243c02af0a0b6cfb90bf92b30110e79028c5e68=ro+wh:~/tca_agent/image_layer_dir/ad86d54176611b5117fc155e8dfbd0b59bc0abce4e2051baef12c2f1e152c92f=ro+wh:~/tca_agent/image_layer_dir/f323ae7b264dcc517876e7c722ac3369baaef1a7c18cc5aae5f43f440fd646c0=ro+wh:~/tca_agent/image_layer_dir/a7d1c89c8422563102bd353de46154191038f92c9ebde8b22a8b2749140029ec=ro+wh:~/tca_agent/image_layer_dir/104adb8634902678f87db6bdbdb12d43d5bd6db9909ae9b12e078286046a1298=ro+wh:~/tca_agent/image_layer_dir/00450b5308ac99846ae7e5fa47652952c4fbbe82882ac241d5153d630644f790=ro+wh:~/tca_agent/image_layer_dir/129675caf5fdc1616c619d5b5718417806a64f282d324a3a580d6df1269b4f3f=ro+wh:~/tca_agent/image_layer_dir/8ce8b37ab4829a1fd34fcd38842b912d46eb3f7511365ccec0399a06670ab2fc=ro+wh:~/tca_agent/image_layer_dir/57080e2e0baad381605079107f08435133d7829364a9c450fc08877f01e57601=ro+wh:~/tca_agent/image_layer_dir/9ca225075a8c2bfd27ef5084e41335d781d24e7be0cbf4575ec3d42de662c6ac=ro+wh:~/tca_agent/image_layer_dir/74ec3835691908f9e6e271797f373257de3f9cc4bb408fd66dd229537ea5fcc1=ro+wh:~/tca_agent/image_layer_dir/59aa8f04c38abaae9c0e430d7b1a91f6560641e429386ee2c4eec57f0af35c04=ro+wh:~/tca_agent/image_layer_dir/bc318ac48b4f7a9536b72e2b0f223726a5225e13ecc70eba4b7b00e2bf80081b=ro+wh:~/tca_agent/image_layer_dir/bbfb0e8818be82ca0f17f280f7ad89497fef6c92e2bb50c40b2bd17c79347425=ro+wh:~/tca_agent/image_layer_dir/f36b94436263ce21d885d2f3f94c7b307e966a989fcefd3027c039e987d7dc2b=ro+wh:~/tca_agent/image_layer_dir/9103dae307f5748103f89093273329a523300b4f103a1d397c44abd766fe0015=ro+wh:~/tca_agent/image_layer_dir/9bd48cc89c1fc083b0db7ed45e5d7e4fec277450b8b47f96884588930ce8c56f=ro+wh:~/tca_agent/image_layer_dir/47ba0411cc8344ab1895a6b8eb0878a9ffd34410170a140ad1f210f20eedcdce=ro+wh:~/tca_agent/image_layer_dir/42b317de582399eb395b2818b4d658fb0a5987e8df1163e49ac2d8bec95a078e=ro+wh:~/tca_agent/image_layer_dir/57bb07a87ab6c29b048638c65566febe800fe79672730f7bb9e70b8f2e677e5a=ro+wh:~/tca_agent/image_layer_dir/b89b49aa036df19c6a2e77cc4aaef707ab3fd916d2d936b9e5e160d448d96ab3=ro+wh:~/tca_agent/image_layer_dir/d7bf931f8235cc7cc68c223b2945f77e858eb8cff4c9cb8bd64bacfd29312672=ro+wh:~/tca_agent/image_layer_dir/49a8b40dbec97066dbad4fb14d1bf388102190442679527e112b030270426ccc=ro+wh:~/tca_agent/image_layer_dir/05f05d402ea8ee67da1af2c9e35d10b9619b0f0c14a56788a1a0b5eeb290d685=ro+wh:~/tca_agent/image_layer_dir/b05d3f32ac4ff52a542dfcf50dbf155d060d79bd23d0ebed1439a3c6b1120731=ro+wh:~/tca_agent/image_layer_dir/0d061258f32c904c95aa020a9f679790c5722c3017eef98e298d6e29b4f02089=ro+wh:~/tca_agent/image_layer_dir/1f9c07049bcd59c59413c1706d0402b04c96598174eb16ef3de25b4e47413ad2=ro+wh:~/tca_agent/image_layer_dir/a86578a8bff61017b80eb653705c3f41136efb9b88facd6a2c67e8b3426e47f9=ro+wh:~/tca_agent/image_layer_dir/c3fdf4a694f0cc03939ee2cfdd09fb623966c5bb193778eaaea317655773656e=ro+wh:~/tca_agent/

Re: Why is the length of max mount option a page size??

2018-05-28 Thread Jungsub Shin
On Fri, May 25, 2018 at 07:42:10PM +0900, J. R. Okajima wrote:
> Jungsub Shin:
> > I know that almost mount option short and page size is enough to
> > contain almost mount options. but because of options for 
> > unionfs(overlay, aufs), lenght of mount option could be exceed it
> > and cut.
> >
> > I suffer this problem with aufs. aufs's branch option is cut and 
> > fail to aufs mount. I know that aufs is not offical fs in linux, 
> 
> For aufs, it should not happen because of the module parameter 'brs.'
> 
> (from the aufs manual)
> --
> .SH Module Parameters
> .TP
> .B brs=1 | 0
> Specifies to use the branch path data file under sysfs or not.
> 
> If the number of your branches is large or their path is long
> and you meet the limitation of mount(8) ro /etc/mtab, you need to
> enable CONFIG_SYSFS and set aufs module parameter brs=1.
> 
> When this parameter is set as 1, aufs does not show `br:' (or dirs=)
> mount option through /proc/mounts (and /etc/mtab). So you can
> keep yourself from the page limitation of
> mount(8) or /etc/mtab.
> Aufs shows branch paths through /fs/aufs/si_XXX/brNNN.
> Actually the file under sysfs has also a size limitation, but I don't
> think it is harmful.
> 
> There is one more side effect in setting 1 to this parameter.
> If you rename your branch, the branch path written in /etc/mtab will be
> obsoleted and the future remount will meet some error due to the
> unmatched parameters (Remember that mount(8) may take the options from
> /etc/mtab and pass them to the systemcall).
> If you set 1, /etc/mtab will not hold the branch path and you will not
> meet such trouble. On the other hand, the entries for the
> branch path under sysfs are generated dynamically. So it must not be 
> obsoleted.
> But I don't think users want to rename branches so often.
> 
> If CONFIG_SYSFS is disable, this parameter is always set to 0.
> --
> 
> 
> If you post the details of your environment to aufs-users ML, then I
> may be able to describe more.
> 
> 
> J. R. Okajima

I think brs module option is irrelevant to this issue. brs module
option looks like that didn't affect passing option parameter with in 
mount() system call.

I suffered this problem below environments.

OS : Ubuntu 18.04 LTS / 4.15.0-20-generic / 64bit
AUFS module parameter : brs = 1 / allow_userns = N
Mount command : mount -t aufs -o 
br=~/tca_agent/container_rw_dir/51509032=rw:~/tca_agent/image_layer_dir/5a259d94211e449fd466d997b5b0b149cb2997a732fd3a838c14295e0eb93f92=ro+wh:~/tca_agent/image_layer_dir/faca908333f884648b75738571879df977339ee7615c65410c98001a463bcd00=ro+wh:~/tca_agent/image_layer_dir/67b50813aedeb67fd06b434163fa64d07fbd16f714196daea1cd139a0171b080=ro+wh:~/tca_agent/image_layer_dir/28b6f7699be037b7f80dd03b22830712aa75b88ddfbba0910dd059b522fbff20=ro+wh:~/tca_agent/image_layer_dir/c47c7125efa9172d262c5b3645594010704f67cf44005da9f6d7ea5a5d2a05db=ro+wh:~/tca_agent/image_layer_dir/b91ed1b448ac52d251c785f5cfc299ca3ba4cfd68d739832b766228afa84a651=ro+wh:~/tca_agent/image_layer_dir/0169cd8bc0bdbecedb30c7d995e69e832d7ccd5c435e72c40af6940db87851b7=ro+wh:~/tca_agent/image_layer_dir/e7ef7d443e31f8b3b8a0a002a6895746d3737289eb2eea18d669924c089279f2=ro+wh:~/tca_agent/image_layer_dir/31bfb0cd724fda09280305b8dc1c4b0587ca01f5dd503d28afa82cff4fa92475=ro+wh:~/tca_agent/image_layer_dir/74428f0d76521fa9b9b1189cb72d303e367003c113cc8a11db125e3f7df1daa1=ro+wh:~/tca_agent/image_layer_dir/b20a927da14045cac0cd6a745f67fdeb88ead6d85752c670ea2773b27387f6ae=ro+wh:~/tca_agent/image_layer_dir/7dee3bce119631e3c922d78860d6b0ae160e237b63bf19f43713a05d1086c72f=ro+wh:~/tca_agent/image_layer_dir/636bce8f18e8734cb98f170bdcf1fb9ae52f1b091bfadcb2bef378b0d829ceb6=ro+wh:~/tca_agent/image_layer_dir/9c6fde234e701cf7b61534ef3a23cc4e0cdb6d3ffc497feaa8fcddc52e8d1fda=ro+wh:~/tca_agent/image_layer_dir/83c2f1968a932e3e284ef20b10a4ef8a9cfc01589dacf2100fb9a78e88c3888e=ro+wh:~/tca_agent/image_layer_dir/ec096a351601040fcd37c31edccd2f68106438097e8adf7253539366b2232de5=ro+wh:~/tca_agent/image_layer_dir/6de889accecb819028355196bde150749598e982b5dfe556540e102c737bfc34=ro+wh:~/tca_agent/image_layer_dir/1042cb8f2263d1030fdb57e0ca671b34a2180bb35d9448737e4a03e4987cf942=ro+wh:~/tca_agent/image_layer_dir/4fab8c997a447af2375e325467661ca1d74bf62dc6d802426f20d0134c9c43bc=ro+wh:~/tca_agent/image_layer_dir/ca57efb1c28464fab46af1826243c02af0a0b6cfb90bf92b30110e79028c5e68=ro+wh:~/tca_agent/image_layer_dir/ad86d54176611b5117fc155e8dfbd0b59bc0abce4e2051baef12c2f1e152c92f=ro+wh:~/tca_agent/image_layer_dir/f323ae7b264dcc517876e7c722ac3369baaef1a7c18cc5aae5f43f440fd646c0=ro+wh:~/t

Why is the length of max mount option a page size??

2018-05-21 Thread Jungsub Shin
Hi, now i'm interested in mount lenght of max mount option.
I anaylsis ksys_mount() function in /fs/namespace.c. and find out 
the length of max mount option is a page size (4096 bytes).

I know that almost mount option short and page size is enough to
contain almost mount options. but because of options for 
unionfs(overlay, aufs), lenght of mount option could be exceed it
and cut.

I suffer this problem with aufs. aufs's branch option is cut and 
fail to aufs mount. I know that aufs is not offical fs in linux, 
but overlay fs now support multi layer mount option and could be 
suffer the same problem.

I think the best is dynamic allocate mount option's kernel memory. 
but I'm only have shallow knowlege of kernel, I can't guess it.
And I think If the length of mount option cannot exceed a page size, 
kernel must leave warning messsage about lenght and return err.
copy_mount_options() function seems to done this.