From: Johannes Berg <johannes@sipsolutions.net>
To: Karel Zak <kzak@redhat.com>
Cc: Hongbo Li <lihongbo22@huawei.com>,
linux-um@lists.infradead.org, linux-fsdevel@vger.kernel.org,
Christian Brauner <brauner@kernel.org>,
Benjamin Berg <benjamin@sipsolutions.net>,
rrs@debian.org
Subject: Re: UML mount failure with Linux 6.11
Date: Thu, 28 Nov 2024 13:55:47 +0100 [thread overview]
Message-ID: <2fb819b00563afbeb69c156b463dd41335c430b6.camel@sipsolutions.net> (raw)
In-Reply-To: <c7hrptra3k6g6jwemz3h5gp4syyz4bttpnepdhpa33htnrltxu@iuusct5yzaso>
Hi,
> > I'd argue though that this doesn't count as fixing the regression, since
> > the kernel was fine before the changes there (even before porting hostfs
> > to the new API) with _any_ version of userspace. Except perhaps for when
> > there's a comma in the path, which I suppose would've broken one way or
> > the other by mount(8) moving to the new API?
>
> Another option is to hardcode a libmount exception that, for hostfs,
> the default behavior should be to use the classic mount(2) syscall if
> the hostfs= option is not present.
I'm not sure using the old mount API would work because the kernel
converted internally to the new one now. Anyway it'd still be a kernel
regression if we have to fix it in userspace, no? :)
> > Assuming no commas, would mount(8) today send the path as the key to a
> > flag option?
>
> Yes, (I have no hostfs here, so example with ext4):
>
> # strace -e fsconfig mount -t ext4 -o /home/hostfs none /mnt/test
>
> fsconfig(3, FSCONFIG_SET_STRING, "source", "none", 0) = 0
> fsconfig(3, FSCONFIG_SET_FLAG, "/home/hostfs", NULL, 0) = -1 EINVAL (Invalid argument)
So I guess that means for paths without comma (almost certainly the
overwhelming majority) we could somehow work around it in the kernel.
Hongbo, what do you think?
> > We could perhaps find a way to handle that in the kernel,
> > and then just do the longer-term plan of moving users to hostfs="..."
> > (by documentation/warning) in the future?
>
> The question is whether investing time in using the path-as-key
> approach makes sense. Perhaps it would be better to stick with the old
> mount(2)
I think it's a matter of not regressing for users, if they just update
the kernel and have old or existing mount tools. And I'm not convinced
using the old API will actually fix the issue, I think maybe the kernel
itself would break that too by parsing it now for the new API?
> and focus on developing a new API that does not have any
> legacy issues. Users who choose to use the hostfs= option and the new
> kernel will be able to utilize the new API.
Right, but we already have that - you can specify hostfs="quoted path"
when everything is new and it'll work just fine?
Question is more around the regression, to me.
johannes
next prev parent reply other threads:[~2024-11-28 12:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 8:13 UML mount failure with Linux 6.11 Ritesh Raj Sarraf
2024-10-31 10:07 ` Benjamin Berg
2024-11-06 11:52 ` Ritesh Raj Sarraf
2024-11-06 19:25 ` Benjamin Berg
2024-11-07 6:22 ` Hongbo Li
2024-11-07 13:09 ` Johannes Berg
2024-11-07 14:17 ` Hongbo Li
2024-11-07 14:35 ` Johannes Berg
2024-11-11 1:16 ` Hongbo Li
2024-11-12 20:10 ` Karel Zak
2024-11-13 1:23 ` Hongbo Li
2024-11-21 13:53 ` Hongbo Li
2024-11-25 17:43 ` Karel Zak
2024-11-26 13:50 ` Johannes Berg
2024-11-27 1:26 ` Hongbo Li
2024-11-27 12:02 ` Karel Zak
2024-11-27 13:15 ` Johannes Berg
2024-11-28 10:58 ` Karel Zak
2024-11-28 12:55 ` Johannes Berg [this message]
2024-11-27 13:55 ` Hongbo Li
2024-11-27 11:55 ` Karel Zak
2024-11-27 12:16 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2fb819b00563afbeb69c156b463dd41335c430b6.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=benjamin@sipsolutions.net \
--cc=brauner@kernel.org \
--cc=kzak@redhat.com \
--cc=lihongbo22@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=rrs@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox