From: Kent Overstreet <kent.overstreet@linux.dev>
To: Christian Brauner <brauner@kernel.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
David Howells <dhowells@redhat.com>,
Amir Goldstein <amir73il@gmail.com>,
Dave Chinner <david@fromorbit.com>, NeilBrown <neilb@suse.de>,
Donald Buczek <buczek@molgen.mpg.de>,
linux-bcachefs@vger.kernel.org,
Stefan Krueger <stefan.krueger@aei.mpg.de>,
linux-fsdevel@vger.kernel.org, Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org
Subject: Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)
Date: Tue, 12 Dec 2023 10:28:53 -0500 [thread overview]
Message-ID: <20231212152853.fvlkgstsvmryoyix@moria.home.lan> (raw)
In-Reply-To: <20231212-sechzehn-hausgemacht-6eb61150554e@brauner>
On Tue, Dec 12, 2023 at 10:35:40AM +0100, Christian Brauner wrote:
> On Tue, Dec 12, 2023 at 10:28:12AM +0100, Miklos Szeredi wrote:
> > On Tue, 12 Dec 2023 at 10:23, Christian Brauner <brauner@kernel.org> wrote:
> > >
> > > On Tue, Dec 12, 2023 at 09:10:47AM +0000, David Howells wrote:
> > > > Christian Brauner <brauner@kernel.org> wrote:
> > > >
> > > > > > > > I suggest:
> > > > > > > >
> > > > > > > > STATX_ATTR_INUM_NOT_UNIQUE - it is possible that two files have the
> > > > > > > > same inode number
> > > > >
> > > > > This is just ugly with questionable value. A constant reminder of how
> > > > > broken this is. Exposing the subvolume id also makes this somewhat redundant.
> > > >
> > > > There is a upcoming potential problem where even the 64-bit field I placed in
> > > > statx() may be insufficient. The Auristor AFS server, for example, has a
> > > > 96-bit vnode ID, but I can't properly represent this in stx_ino. Currently, I
> > >
> > > Is that vnode ID akin to a volume? Because if so you could just
> > > piggy-back on a subvolume id field in statx() and expose it there.
> >
> > And how would exporting a subvolume ID and expecting userspace to take
> > that into account when checking for hard links be meaningfully
> > different than expecting userspace to retrieve the file handle and
> > compare that?
> >
> > The latter would at least be a generic solution, including stacking fs
> > inodes, instead of tackling just a specific corner of the problem
> > space.
>
> So taking a step back here, please. The original motivation for this
> discussion was restricted to handle btrfs - and now bcachefs as well.
> Both have a concept of a subvolume so it made sense to go that route.
> IOW, it wasn't originally a generic problem or pitched as such.
>
> Would overlayfs be able to utilize an extended inode field as well?
No, the original motivation was not just btrfs and bcachefs; overlayfs
fundamentally needs to export a bigger identifier than the host
filesystems - pigeonhole principle, if anyone remembers their
combinatorics.
This applies to any filesystem which is under the hood reexporting from
other filesystems; there's a lot of stuff going on in container
filesystems right now, and I expect it'll come up there (you can create
new identifiers if you're exporting file by file, but not if it's
directory trees).
And Neal brought up NFS re-exports; I think there's a compelling
argument to be made that we ought to be able to round trip NFS
filehandles.
next prev parent reply other threads:[~2023-12-12 15:28 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <12f711f9-70a2-408e-8588-2839e599b668@molgen.mpg.de>
[not found] ` <170181366042.7109.5045075782421670339@noble.neil.brown.name>
[not found] ` <97375d00-4bf7-4c4f-96ec-47f4078abb3d@molgen.mpg.de>
[not found] ` <170199821328.12910.289120389882559143@noble.neil.brown.name>
[not found] ` <20231208013739.frhvlisxut6hexnd@moria.home.lan>
[not found] ` <170200162890.12910.9667703050904306180@noble.neil.brown.name>
[not found] ` <20231208024919.yjmyasgc76gxjnda@moria.home.lan>
[not found] ` <630fcb48-1e1e-43df-8b27-a396a06c9f37@molgen.mpg.de>
[not found] ` <20231208200247.we3zrwmnkwy5ibbz@moria.home.lan>
[not found] ` <170233460764.12910.276163802059260666@noble.neil.brown.name>
2023-12-11 23:32 ` file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?) Kent Overstreet
2023-12-11 23:53 ` NeilBrown
2023-12-12 0:05 ` Kent Overstreet
2023-12-12 0:59 ` NeilBrown
2023-12-12 1:10 ` Kent Overstreet
2023-12-12 2:13 ` NeilBrown
2023-12-12 2:24 ` Kent Overstreet
2023-12-12 9:08 ` Christian Brauner
2023-12-12 5:53 ` Dave Chinner
2023-12-12 6:32 ` Amir Goldstein
2023-12-12 8:56 ` Christian Brauner
2023-12-12 15:16 ` Kent Overstreet
2023-12-12 15:29 ` Christian Brauner
2023-12-12 15:35 ` Kent Overstreet
2023-12-12 15:38 ` Miklos Szeredi
2023-12-12 15:43 ` Kent Overstreet
2023-12-12 15:57 ` Miklos Szeredi
2023-12-12 16:08 ` Kent Overstreet
2023-12-12 16:30 ` Miklos Szeredi
2023-12-12 16:41 ` Kent Overstreet
2023-12-12 21:53 ` NeilBrown
2023-12-13 9:41 ` Christian Brauner
2023-12-12 21:46 ` NeilBrown
2023-12-13 9:47 ` Christian Brauner
2023-12-13 10:04 ` Christian Brauner
2023-12-14 22:47 ` NeilBrown
2023-12-15 0:36 ` Kent Overstreet
2023-12-12 9:10 ` David Howells
2023-12-12 9:23 ` Christian Brauner
2023-12-12 9:28 ` Miklos Szeredi
2023-12-12 9:35 ` Christian Brauner
2023-12-12 9:42 ` Miklos Szeredi
2023-12-12 13:47 ` Christian Brauner
2023-12-12 14:06 ` Miklos Szeredi
2023-12-12 15:24 ` Christian Brauner
2023-12-12 15:28 ` Kent Overstreet [this message]
2023-12-12 9:46 ` David Howells
2023-12-12 9:10 ` file handle in statx Donald Buczek
2023-12-12 15:20 ` Theodore Ts'o
2023-12-12 17:15 ` Frank Filz
2023-12-12 17:44 ` Kent Overstreet
2023-12-12 18:17 ` Amir Goldstein
2023-12-12 19:18 ` Frank Filz
2023-12-12 20:59 ` Dave Chinner
2023-12-12 21:57 ` NeilBrown
2023-12-12 22:23 ` Dave Chinner
2023-12-12 22:36 ` NeilBrown
2023-12-12 22:39 ` Kent Overstreet
2023-12-12 23:44 ` Dave Chinner
2023-12-13 0:00 ` Kent Overstreet
2023-12-13 7:37 ` Donald Buczek
2023-12-13 12:28 ` Kent Overstreet
2023-12-13 13:48 ` Donald Buczek
2023-12-19 7:41 ` Donald Buczek
2023-12-12 15:21 ` file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?) Kent Overstreet
2023-12-12 20:48 ` Dave Chinner
2023-12-12 21:23 ` Kent Overstreet
2023-12-12 22:10 ` Dave Chinner
2023-12-12 22:31 ` NeilBrown
2023-12-12 23:06 ` Dave Chinner
2023-12-12 23:42 ` Kent Overstreet
2023-12-13 0:03 ` NeilBrown
2023-12-12 22:00 ` NeilBrown
2023-12-12 7:03 ` David Howells
2023-12-12 0:25 ` David Howells
2023-12-11 23:40 ` David Howells
2023-12-12 20:59 ` Kent Overstreet
2023-12-12 22:57 ` NeilBrown
2023-12-12 23:43 ` Kent Overstreet
2023-12-13 0:02 ` NeilBrown
2023-12-13 0:14 ` Kent Overstreet
2023-12-13 22:45 ` Andreas Dilger
2023-12-13 23:24 ` Kent Overstreet
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=20231212152853.fvlkgstsvmryoyix@moria.home.lan \
--to=kent.overstreet@linux.dev \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=buczek@molgen.mpg.de \
--cc=david@fromorbit.com \
--cc=dhowells@redhat.com \
--cc=josef@toxicpanda.com \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=neilb@suse.de \
--cc=stefan.krueger@aei.mpg.de \
/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).