Linux filesystem development
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>
Subject: Re: mount api: Q on behavior of mount_single vs. get_tree_single
Date: Wed, 15 Jan 2025 10:52:21 -0600	[thread overview]
Message-ID: <655a759a-5d85-4384-8ba0-e444c53a7304@redhat.com> (raw)
In-Reply-To: <732c3de1-ef0b-49a9-b2c2-0c3c5e718a40@redhat.com>

(ugh, curse auto complete on addresses, cc: fixed sorry.)

On 1/15/25 10:50 AM, Eric Sandeen wrote:
> I was finally getting back to some more mount API conversions,
> and was looking at pstore, which I thought would be straightforward.
> 
> I noticed that mount options weren't being accepted, and I'm fairly
> sure that this is because there's some internal or hidden mount of
> pstore, and mount is actually a remount due to it using a single
> superblock. (looks like it was some sort of clone mount done under
> the covers by various processes, still not sure.)
> 
> In any case, that led me to wonder:
> 
> Should get_tree_single() be doing an explicit reconfigure like
> mount_single does?
> 
> mount_single() {
> ...
>         if (!s->s_root) {
>                 error = fill_super(s, data, flags & SB_SILENT ? 1 : 0);
>                 if (!error)
>                         s->s_flags |= SB_ACTIVE;
>         } else {
>                 error = reconfigure_single(s, flags, data);
>         }
> ...
> 
> My pstore problem abovec reminded me of the recent issue with tracefs
> after the mount api conversion, fixed with:
> 
> e4d32142d1de tracing: Fix tracefs mount options
> 
> and discussed at:
> 
> https://lore.kernel.org/lkml/20241030171928.4168869-2-kaleshsingh@google.com/
> 
> which in turn reminded me of:
> 
> a6097180d884 devtmpfs regression fix: reconfigure on each mount
> 
> so we've seen this difference in behavior with get_tree_single twice already,
> and then I ran into it again on pstore.
> 
> Should get_tree_single() callers be fixing this up themselves ala devtmpfs
> and tracefs, or should get_tree_single() be handling this internally?
> 
> Right now in my pstore patch I'm doing:
> 
> static int pstore_get_tree(struct fs_context *fc)
> {
>        if (fc->root)
>                return pstore_reconfigure(fc);
> 
>        return get_tree_single(fc, pstore_fill_super);
> }
> 
> but it really feels like this should be handled by core code instead.
> 
> Thoughts?
> 
> Thanks,
> -Eric
> 
> 


  reply	other threads:[~2025-01-15 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15 16:50 mount api: Q on behavior of mount_single vs. get_tree_single Eric Sandeen
2025-01-15 16:52 ` Eric Sandeen [this message]
2025-01-16 10:28 ` Christian Brauner
2025-01-16 15:38   ` Eric Sandeen
2025-01-20 11:23     ` Christian Brauner
2025-01-30 19:47       ` Eric Sandeen

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=655a759a-5d85-4384-8ba0-e444c53a7304@redhat.com \
    --to=sandeen@redhat.com \
    --cc=brauner@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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