From: Hongbo Li <lihongbo22@huawei.com>
To: "Linus Torvalds" <torvalds@linux-foundation.org>,
"Maciej Żenczykowski" <maze@google.com>,
"Matthew Wilcox" <willy@infradead.org>
Cc: Kernel hackers <linux-kernel@vger.kernel.org>,
Patrick Rohr <prohr@google.com>,
Christian Brauner <brauner@kernel.org>
Subject: Re: UML/hostfs - mount failure at tip of tree
Date: Wed, 24 Jul 2024 09:34:47 +0800 [thread overview]
Message-ID: <b84a6ef8-7c3b-4c04-81d3-859692d91137@huawei.com> (raw)
In-Reply-To: <CAHk-=wijWMpPk7feEZ8DzdLi7WLp_BhRpm+qgs6Tew1Bb2CmyQ@mail.gmail.com>
On 2024/7/24 9:14, Linus Torvalds wrote:
> On Tue, 23 Jul 2024 at 15:33, Maciej Żenczykowski <maze@google.com> wrote:
>>
>> Reverting the following 3 patches:
>> - 104eef133fd9 hostfs: Add const qualifier to host_root in hostfs_fill_super()
>> - cd140ce9f611 hostfs: convert hostfs to use the new mount API
>> - e3ec0fe944d2 hostfs: Convert hostfs_read_folio() to use a folio
>>
>> appears to be necessary to get the Android net test framework to boot
>> with tip of tree,
>> *without* the reverts we get:
>> mount: /host: special device hostfs does not exist.
>> (if I don't revert the folio change then it mounts, but appears to not
>> actually work)
>
> Interesting. That folio change was clearly supposed to be a no-op, but
> isn't. Which makes a revert the right thing to do regardless.
>
> That code was odd before too, but clearly that commit is completely broken.
>
> I think this part is buggy:
>
> buffer = folio_zero_tail(folio, bytes_read, buffer);
>
> because while the documentation for folio_zero_tail() does imply that
> usage, the third argument is supposed really looks like it should be
> "buffer + bytes_read".
>
> So instead of reverting that commit, does it help to just do that instead:
>
> - buffer = folio_zero_tail(folio, bytes_read, buffer);
> + buffer = folio_zero_tail(folio, bytes_read, buffer +
> bytes_read);
>
> Willy, that function is really bad. It's not helpful when it
> apparently confused even you, and the calling convention really is
> broken. I think that folio_zero_tail() needs to be rewritten to have
> sane calling conventions (like matching the docs!) or just die.
>
> The mount API change is somethign else. Again, it wasn't supposed to
> break anything, but clearly does, and so reverting it sounds sane
> unless somebody sees what the problem is.
>
I apologize for causing this issue. I am currently tracking it down. If
reverting this can solve the problem, you can revert it first.
Thanks,
Hongbo
> I'm not even guessing at what might have been wrong in that mount API
> conversion.
>
> Linus
next prev parent reply other threads:[~2024-07-24 1:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 22:33 Maciej Żenczykowski
2024-07-24 1:14 ` Linus Torvalds
2024-07-24 1:34 ` Hongbo Li [this message]
2024-07-24 2:22 ` Linus Torvalds
2024-07-24 2:55 ` Maciej Żenczykowski
2024-07-24 3:59 ` Maciej Żenczykowski
2024-07-24 9:49 ` Hongbo Li
2024-07-26 7:41 ` Christian Brauner
2024-07-26 7:52 ` Christian Brauner
2024-07-26 8:36 ` Hongbo Li
2024-07-24 2:54 ` Hongbo Li
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=b84a6ef8-7c3b-4c04-81d3-859692d91137@huawei.com \
--to=lihongbo22@huawei.com \
--cc=brauner@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maze@google.com \
--cc=prohr@google.com \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.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
all inboxes | Powered by JetHome®