Re: [PATCH 1/4] overlay: workaround libmount failure to remount,ro

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

 



On Tue, May 27, 2025 at 4:49 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Mon, 26 May 2025 at 16:35, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> >
> > libmount v1.41 calls several unneeded fsconfig() calls to reconfigure
> > lowerdir/upperdir when user requests only -o remount,ro.
>
> Isn't this a libmount bug then?
>
> Working around it in xfstests just hides this, which seems counter productive.
>

Yes, to some extent, however, IMO the purpose of fstests is to test the
filesystem and the vfs and for very fs-specific tests it also tests the
*progs utils.

I do not think we can afford fstest being a test for libc+libmount and the
entire ecosystem. That's part of the reason that fstest implements
some of its own utilities to exercise syscalls.

If we leave the tests failing, we will loose test coverage from all
the people that are running with not-cutting-edge distro.
I don't think this is a desired outcome for us.
Test coverage for remount,ro is pretty important IMO.

FWIW, we already used LIBMOUNT_FORCE_MOUNT2 to workaround
another libmount bug I believe you were in the loop when we did that
(see blow).

Any other idea how to address those libmount bugs in the test suite
other than keeping the tests failing or not running for libmount >= v1.39?

Thanks,
Amir.

commit 30fc8ed13aa241e7caf1c27d1b60c64ab3ae7a18
Author: Amir Goldstein <amir73il@xxxxxxxxx>
Date:   Mon Oct 23 19:32:59 2023 +0300

    overlay: add test for lowerdir mount option parsing

    Check parsing and display of spaces and escaped colons and commans in
    lowerdir mount option.

    This is a regression test for two bugs introduced in v6.5 with the
    conversion to new mount api.

    There is another regression of new mount api related to libmount parsing
    of escaped commas, but this needs a fix in libmount - this test only
    verifies the fixes in the kernel, so it uses LIBMOUNT_FORCE_MOUNT2=always
    to force mount(2) and kernel pasring of the comma separated options list.

...

+# Kernel commit c34706acf40b fixes parsing of mount options with escaped comma
+# when the mount options string is provided via data argument to
mount(2) syscall.
+# With libmount >= 2.39, libmount itself will try to split the comma separated
+# options list provided to mount(8) commnad line and call fsconfig(2) for each
+# mount option seperately.  Since libmount does not obay to overlayfs escaped
+# commas format, it will call fsconfig(2) with the wrong path (i.e.
".../lower3")
+# and this test will fail, but the failure would indicate a libmount issue, not
+# a kernel issue.  Therefore, force libmount to use mount(2) syscall,
so we only
+# test the kernel fix.
+LIBMOUNT_FORCE_MOUNT2=always $MOUNT_PROG -t overlay
$OVL_BASE_SCRATCH_DEV $SCRATCH_MNT \
+       -o"upperdir=$upperdir,workdir=$workdir,lowerdir=$lowerdir_commas_esc"
2>> $seqres.full || \
+       echo "ERROR: incorrect parsing of escaped comma in lowerdir
mount option"





[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