From: Eric Sandeen <sandeen@redhat.com>
To: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: linux-nilfs@vger.kernel.org
Subject: Re: [PATCH] nilfs2: convert to use the new mount API
Date: Thu, 4 Apr 2024 20:46:21 -0500 [thread overview]
Message-ID: <0d26ef52-91bd-4108-bf09-5d92fa58cd28@redhat.com> (raw)
In-Reply-To: <2fd47dc7-e130-4c67-b39a-b1c38aa1c500@redhat.com>
On 4/4/24 8:21 PM, Eric Sandeen wrote:
> So the oops you hit is when a snapshot is mounted first, then the main
> fs is mounted.
>
> My patch does this:
>
> /*
> * Try remount to setup mount states if the current
> * tree is not mounted and only snapshots use this sb.
> */
> err = nilfs_reconfigure(fc);
>
> (in place of nilfs_remount()), and nilfs_reconfigure expects to have
> fc->root set, which is normally only set up for an actual remount.
>
> fc->root is NULL, so that's the oops. I'll see what I can work out.
Not sure if this is a terrible hack, but your test script passes with
this change on top of my original patch:
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 1cdc38db2612..4a9a8924068e 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -1232,6 +1232,7 @@ nilfs_get_tree(struct fs_context *fc)
* Try remount to setup mount states if the current
* tree is not mounted and only snapshots use this sb.
*/
+ fc->root = s->s_root;
err = nilfs_reconfigure(fc);
if (err)
goto failed_super;
-Eric
next prev parent reply other threads:[~2024-04-05 1:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 22:12 [PATCH] nilfs2: convert to use the new mount API Eric Sandeen
2024-04-04 20:11 ` Ryusuke Konishi
2024-04-04 20:35 ` Eric Sandeen
2024-04-04 22:33 ` Ryusuke Konishi
2024-04-05 1:21 ` Eric Sandeen
2024-04-05 1:46 ` Eric Sandeen [this message]
2024-04-05 3:00 ` [PATCH V2] " Eric Sandeen
2024-04-05 10:33 ` Ryusuke Konishi
2024-04-05 15:03 ` Eric Sandeen
2024-04-09 20:17 ` Ryusuke Konishi
2024-04-09 19:13 ` Ryusuke Konishi
2024-04-09 19:54 ` Eric Sandeen
2024-04-09 20:36 ` Ryusuke Konishi
2024-04-10 12:47 ` Ryusuke Konishi
-- strict thread matches above, loose matches on Subject: below --
2024-04-24 18:27 [PATCH] " Ryusuke Konishi
2024-04-25 8:58 ` Ryusuke Konishi
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=0d26ef52-91bd-4108-bf09-5d92fa58cd28@redhat.com \
--to=sandeen@redhat.com \
--cc=konishi.ryusuke@gmail.com \
--cc=linux-nilfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).