Re: UML mount failure with Linux 6.11

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

 



On Tue, Nov 26, 2024 at 02:50:38PM GMT, Johannes Berg wrote:
> On Mon, 2024-11-25 at 18:43 +0100, Karel Zak wrote:
> > 
> > The long-term solution would be to clean up hostfs and use named
> > variables, such as "mount -t hostfs none -o 'path="/home/hostfs"'.
> 
> That's what Hongbo's commit *did*, afaict, but it is a regression.
> 
> Now most of the regression is that with fsconfig() call it was no longer
> possible to specify a bare folder, and then we got discussing what
> happens if the folder name actually contains a comma...
> 
> But this is still a regression, so we need to figure out what to do
> short term?

I will add support for quotes for unnamed options, so that
"/home/hostfs,dir" will be treated as a single option for libmount.

I am unsure how to resolve this issue without using quotes, as we need
a method to distinguish between a path with a comma and other options.

> Ignoring the "path with comma" issue, because we can't even fix that in
> the kernel given what you describe changed in userspace, we can probably
> only
> 
>  1) revert the hostfs conversion to the new API, or
>  2) somehow not require the hostfs= key?

The hostfs= key is likely the most reliable method to use fsconfig().
The goal should be to get from userspace:

    fsconfig(fs, FSCONFIG_SET_STRING, "hostfs", "/home/hostfs,dir");

I can add a temporary workaround to libmount for hostfs, which will
automatically add the hostfs= key for unnamed paths. This will allow
you to receive the expected fsconfig() data from userspace.

If we will go this way, then it would be nice to update hostfs docs to
motivate users to use hostfs="" in configuration, and I will probably
add later a warning to mount(8) to force users to use hostfs="" key.

Does it make sense?

> Fixing the regression fully (including for paths containing commas)
> probably also requires userspace changes. If you don't want to make
> those we can only point to your workarounds instead, since we can't do
> anything on the kernel side.

I am open to temporary FS-specific libmount workarounds, but I would
like to see a long-term solution and plan on how to encourage users to
use it.

> I don't know the fsconfig() API, is it possible to have key-less or
> value-less calls? What does happen 

The key is always required; otherwise, you will receive an -EINVAL error.
https://github.com/torvalds/linux/blob/master/fs/fsopen.c#L369

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux