Re: [PATCH] ovl: fix regression in showing lowerdir mount option

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

 



On Tue, Nov 28, 2023 at 5:11 PM Karel Zak <kzak@xxxxxxxxxx> wrote:
>
> On Mon, Oct 16, 2023 at 03:10:33PM +0200, Miklos Szeredi wrote:
> > Ah, but it's not a regression after all, since the kernel un-split the
> > same commas until 6.5, so there was no way the libmount devs would
> > have observed any regression in overlayfs mount.   But arguing about
> > which component is the cause of the regression is not very productive.
> > Indeed libmount can be fixed parse overlayfs options the same way as
> > the kernel parsed them before 6.5, which is probably a much better
> > fix, than a kernel one.
> >
> > Karel, is doing such filesystem specific option handling feasible?
> >
> > If so, then for overlayfs please please pass an un-escaped (\char ->
> > char) string to fsconfig for "upperdir=" and "workdir=" options.
>
> Committed to the libmount:
> https://github.com/util-linux/util-linux/commit/f6c29efa929cb8c741591ab38061e7921d53a997
>
> will be in util-linux v2.40 and in v2.39.3
>
> It's implemented for all filesystems, not exception for overlayfs.

Nice!

Note that this code:

if (*p == ',' && (p == optstr0 || *(p - 1) != '\\'))
        stop = p; /* terminate the option item */

...
        strrem(p, '\\');
        value = p;

Will not split either of the following:
b\,a\,r
b\\,a\,r

while legacy overlayfs does split the , when followed by \\

IMO what you did is good enough for all practical cases
and there is no need to go down the rabbit hole of proper escaping
(unless bugs are reported).

Just wanted to point out the difference.

Thanks,
Amir.





[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux