From: "Theodore Tso" <tytso@mit.edu>
To: Christoph Hellwig <hch@infradead.org>
Cc: Anand Jain <anajain.sg@gmail.com>,
"Darrick J. Wong" <djwong@kernel.org>,
linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-xfs@vger.kernel.org, Anand Jain <asj@kernel.org>
Subject: Re: [PATCH v2 3/3] ext4: derive f_fsid from block device to avoid collisions
Date: Tue, 7 Apr 2026 10:47:09 -0400 [thread overview]
Message-ID: <20260407144709.GA81690@macsyma-wired.lan> (raw)
In-Reply-To: <adSUiB9L0sFAd04U@infradead.org>
On Mon, Apr 06, 2026 at 10:22:16PM -0700, Christoph Hellwig wrote:
> > Dilemma:
> > While statfs(2) [1] suggests f_fsid is "some random stuff," we know
> > userspace (NFS, systemd) often treats it as a persistent handle.
> >
> > Do you prefer one of the names above, or is there a more idiomatic ext4
> > naming convention I should follow?
> >
>
> My take is that anything that should persist should be an on-disk
> feature flag, not a mount option. But I'm not in charge for ext4
My take is that f_fsid is random stuff, as documented by the
specification, so anyone who tries to depend on it needs to be kept in
a padding room where they can't hurt themselves or their users.
And as far as NFS is concerned, file handles should be based on
the super block UUID, not statfs's f_fsid, and anyone who wants to
mount a snapshot as an NFS exported file system at the same time that
the original file system is mounted is _also_ should be gently coaxed
into a padding room where they can't hurt themselves or their users.
The solution that we've used for people who are cloning block devices
for things like cloud images has been for *years* has been to use
"tune2fs -U random /dev/sda1". And this works on mounted file system,
and (for example) built into various cloud images for Google Cloud
Engine.
If we want to change statfs's f_fsid, from one set of "Random stuff"
to another set of "Random stuff", I don't really mind, but I don't
think it's worth *either* a mount option, *or* a feature flag, as
either would be confusing for system adminsitrators when some file
systems behave one way, and other file systems behave another.
- Ted
prev parent reply other threads:[~2026-04-07 14:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 11:55 [PATCH v2 0/3] fix s_uuid and f_fsid consistency for cloned filesystems Anand Jain
2026-03-21 11:55 ` [PATCH v2 1/3] btrfs: use on-disk uuid for s_uuid in temp_fsid mounts Anand Jain
2026-03-21 11:55 ` [PATCH v2 2/3] btrfs: derive f_fsid from on-disk fsuuid and dev_t Anand Jain
2026-03-21 11:55 ` [PATCH v2 3/3] ext4: derive f_fsid from block device to avoid collisions Anand Jain
2026-03-23 4:16 ` Theodore Tso
2026-03-23 15:29 ` Darrick J. Wong
2026-03-23 16:44 ` Darrick J. Wong
2026-03-25 10:02 ` Andreas Dilger
2026-03-25 10:59 ` Anand Jain
2026-03-25 12:59 ` Theodore Tso
2026-04-02 7:33 ` Anand Jain
2026-03-23 15:41 ` Anand Jain
2026-04-04 8:59 ` Anand Jain
2026-04-07 5:22 ` Christoph Hellwig
2026-04-07 14:47 ` Theodore Tso [this message]
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=20260407144709.GA81690@macsyma-wired.lan \
--to=tytso@mit.edu \
--cc=anajain.sg@gmail.com \
--cc=asj@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-xfs@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