Re: mount option incompatibility with (lib)mount 2.39 and new kernel mount API

2023-07-02 Thread Guan Xin
Dear Okajima,

On Mon, Jul 3, 2023 at 6:19 AM  wrote:
>
  //snip
> > For example overlayfs uses lowerdir=/lower1:/lower2:/lower3, so the usage
> > of colon as separator within an option value is not unique.
>
> I know about that.
> But overlayfs doesn't have the layer attribute such as "=rw" and "=rr".

Does this look ok? --
  mount -t aufs -o br=${BR1_ATTR}:${PATH_TO_BR1} -o
br=${BR2_ATTR}:${PATH_TO_BR2}
which is equivalent to
  mount -t aufs -o br=${BR1_ATTR}:${PATH_TO_BR1},br=${BR2_ATTR}:${PATH_TO_BR2}
(Special characters need to be escaped in the latter form.)

Regards,
Guan



Re: mount option incompatibility with (lib)mount 2.39 and new kernel mount API

2023-07-02 Thread hooanon05g
Thomas Wei schuh:
> > "br=/upper=rw:/lower=ro" is not bad but I feel weird.
>
> This feels ok for me.

For me, "A = B = C" looks strange because B is a path and C is its
attribute.
But I start making myself feel "there is no problem here."


> For example overlayfs uses lowerdir=/lower1:/lower2:/lower3, so the usage
> of colon as separator within an option value is not unique.

I know about that.
But overlayfs doesn't have the layer attribute such as "=rw" and "=rr".


J. R. Okajima



Re: mount option incompatibility with (lib)mount 2.39 and new kernel mount API

2023-07-02 Thread Thomas Weißschuh
Hi!

On 2023-07-01 09:08:46+0900, J. R. Okajima wrote:
> Hello Thomas,
> 
> Thomas Wei schuh:
> > recently util-linux 2.39 was released.
> > In this release the mount(8) command and libmount where changed to use
> > the new fd-based mount API found in newer kernels.
>   :::
> > Would it make sense from aufs side to update the docs to use the
> > equality sign based syntax?
> > It seems to be supported as well as the colon-based one.
> 
> Thanx for the report.
> Aufs is using colon in several options where an eaual sign specifies the
> branch attribute such as RW and ROs.
> Now I need to consider about all of them.
> 
> Currently
> 
>   br:/upper=rw:/lower=ro
> 
> is the only option to take multiple branch specifiers.
> Also this branch syntax appears in /sys/fs/aufs/si_XXX/br0, br1, ...
> 
> br0: /upper=rw
> br1: /lower=ro
> 
> I believe they should be same to the mount option syntax.
> "br=/upper=rw:/lower=ro" is not bad but I feel weird.

This feels ok for me.

For example overlayfs uses lowerdir=/lower1:/lower2:/lower3, so the usage
of colon as separator within an option value is not unique.

Also having more equality signs within an option does not seem too weird
to me, but I don't know about a precedent of the top of my head.

> If I change "/upper:rw' syntax, that is not bad. But what is good to
> delimit the branches?
> 
> Additionally there are other options using colon,
> 
>   add:1:/middle=rw
>   mod:/upper=ro
>   append:/bottom=rr+wh
>   prepend:/new_top=rw+icex
> 
> Hmm, these options take only one branch specifier. It may be rather
> easier than 'br' option. But I need to consider.
> 
> The option to remove a branch from the union is easy to replace.
> 
>   del:dir
> 
> Other options using colon are not required to replace
> 
>   create=tdmfs:low[:second]
>   create=mfs[:second]
>   create=mfsrr:low[:second]
>   create=pmfs[:second]
>   create=pmfsrr:low[:second]
> 
> I am still thinking...

Users in the linked issue reported that at least for br: and add: it is
already possible to use the equality sign instead of the colon.
(At least with the new mount API)

And for "br" it is already documented this way on aufs.sourceforge.net.

This made me think that the equality sign would already be fully
supported by aufs, hoping it would only be necessary to update and align
the documentation.

Thomas