Re: file handle in statx

2023-12-18 Thread Donald Buczek
Dear Kent, On 12/13/23 14:48, Donald Buczek wrote: > On 12/13/23 13:28, Kent Overstreet wrote: >> On Wed, Dec 13, 2023 at 08:37:57AM +0100, Donald Buczek wrote: >>> Probably not for the specific applications I mentioned (backup, mirror, >>> accounting). These are intended to run continuously,

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-14 Thread Kent Overstreet
On Fri, Dec 15, 2023 at 09:47:47AM +1100, NeilBrown wrote: > On Wed, 13 Dec 2023, Christian Brauner wrote: > > On Wed, Dec 13, 2023 at 08:46:54AM +1100, NeilBrown wrote: > > > On Wed, 13 Dec 2023, Miklos Szeredi wrote: > > > > On Tue, 12 Dec 2023 at 16:35, Kent Overstreet > > > > wrote: > > > >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-14 Thread NeilBrown
On Wed, 13 Dec 2023, Christian Brauner wrote: > On Wed, Dec 13, 2023 at 08:46:54AM +1100, NeilBrown wrote: > > On Wed, 13 Dec 2023, Miklos Szeredi wrote: > > > On Tue, 12 Dec 2023 at 16:35, Kent Overstreet > > > wrote: > > > > > > > Other poeple have been finding ways to contribute to the

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-13 Thread Kent Overstreet
On Wed, Dec 13, 2023 at 03:45:41PM -0700, Andreas Dilger wrote: > It should be possible for userspace and the kernel to increase the size of > struct statx independently, and not have any issues. If userspace requests > a field via STATX_* flags that the kernel doesn't understand, then it will >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-13 Thread Andreas Dilger
ells wrote: >>>>> Kent Overstreet wrote: >>>>> >>>>>> I was chatting a bit with David Howells on IRC about this, and floated >>>>>> adding the file handle to statx. It looks like there's enough space >>>>>> reserve

Re: file handle in statx

2023-12-13 Thread Donald Buczek
On 12/13/23 13:28, Kent Overstreet wrote: > On Wed, Dec 13, 2023 at 08:37:57AM +0100, Donald Buczek wrote: >> Probably not for the specific applications I mentioned (backup, mirror, >> accounting). These are intended to run continuously, slowly and unnoticed >> in the background, so they are

Re: file handle in statx

2023-12-13 Thread Kent Overstreet
On Wed, Dec 13, 2023 at 08:37:57AM +0100, Donald Buczek wrote: > Probably not for the specific applications I mentioned (backup, mirror, > accounting). These are intended to run continuously, slowly and unnoticed > in the background, so they are memory and i/o throttled via cgroups anyway > and

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-13 Thread Christian Brauner
On Wed, Dec 13, 2023 at 10:48:01AM +0100, Christian Brauner wrote: > On Wed, Dec 13, 2023 at 08:46:54AM +1100, NeilBrown wrote: > > On Wed, 13 Dec 2023, Miklos Szeredi wrote: > > > On Tue, 12 Dec 2023 at 16:35, Kent Overstreet > > > wrote: > > > > > > > Other poeple have been finding ways to

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-13 Thread Christian Brauner
On Wed, Dec 13, 2023 at 08:46:54AM +1100, NeilBrown wrote: > On Wed, 13 Dec 2023, Miklos Szeredi wrote: > > On Tue, 12 Dec 2023 at 16:35, Kent Overstreet > > wrote: > > > > > Other poeple have been finding ways to contribute to the technical > > > discussion; just calling things "ugly and

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-13 Thread Christian Brauner
> But when you show up to a discussion that's been going on for a page, On the bcachefs mailing list without fsdevel or anyone else Cced. > where everything's been constructively gathering input, and you start > namecalling - and crucially, _without giving any technical justification I didn't

Re: file handle in statx

2023-12-12 Thread Donald Buczek
On 12/12/23 16:20, Theodore Ts'o wrote: > On Tue, Dec 12, 2023 at 10:10:23AM +0100, Donald Buczek wrote: >> On 12/12/23 06:53, Dave Chinner wrote: >> >>> So can someone please explain to me why we need to try to re-invent >>> a generic filehandle concept in statx when we already have a >>> have

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
6PM +, David Howells wrote: > > > > > Kent Overstreet wrote: > > > > > > > > > > > I was chatting a bit with David Howells on IRC about this, and > > > > > > floated > > > > > > adding the file handle to statx. I

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread NeilBrown
On Wed, 13 Dec 2023, Dave Chinner wrote: > On Wed, Dec 13, 2023 at 09:31:13AM +1100, NeilBrown wrote: > > On Wed, 13 Dec 2023, Dave Chinner wrote: > > > > > > What you are suggesting is that we now duplicate filehandle encoding > > > into every filesystem's statx() implementation. That's a bad >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread NeilBrown
> > > > > > > I was chatting a bit with David Howells on IRC about this, and floated > > > > > adding the file handle to statx. It looks like there's enough space > > > > > reserved to make this feasible - probably going with a fixed maximum >

Re: file handle in statx

2023-12-12 Thread Dave Chinner
On Tue, Dec 12, 2023 at 05:39:27PM -0500, Kent Overstreet wrote: > On Wed, Dec 13, 2023 at 09:23:18AM +1100, Dave Chinner wrote: > > On Wed, Dec 13, 2023 at 08:57:43AM +1100, NeilBrown wrote: > > > On Wed, 13 Dec 2023, Dave Chinner wrote: > > > > On Tue, Dec 12, 2023 at 09:15:29AM -0800, Frank

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
Howells on IRC about this, and floated > > > > adding the file handle to statx. It looks like there's enough space > > > > reserved to make this feasible - probably going with a fixed maximum > > > > size of 128-256 bits. > > > > > > We can

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
On Wed, Dec 13, 2023 at 10:06:37AM +1100, Dave Chinner wrote: > On Wed, Dec 13, 2023 at 09:31:13AM +1100, NeilBrown wrote: > > On Wed, 13 Dec 2023, Dave Chinner wrote: > > > > > > What you are suggesting is that we now duplicate filehandle encoding > > > into every filesystem's statx()

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread NeilBrown
On Wed, 13 Dec 2023, Kent Overstreet wrote: > On Mon, Dec 11, 2023 at 11:40:16PM +, David Howells wrote: > > Kent Overstreet wrote: > > > > > I was chatting a bit with David Howells on IRC about this, and floated > > > adding the file handle to statx. I

Re: file handle in statx

2023-12-12 Thread NeilBrown
On Wed, 13 Dec 2023, Dave Chinner wrote: > On Wed, Dec 13, 2023 at 08:57:43AM +1100, NeilBrown wrote: > > On Wed, 13 Dec 2023, Dave Chinner wrote: > > > On Tue, Dec 12, 2023 at 09:15:29AM -0800, Frank Filz wrote: > > > > > On Tue, Dec 12, 2023 at 10:10:23AM +0100, Donald Buczek wrote: > > > > > >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread NeilBrown
On Wed, 13 Dec 2023, Dave Chinner wrote: > > What you are suggesting is that we now duplicate filehandle encoding > into every filesystem's statx() implementation. That's a bad > trade-off from a maintenance, testing and consistency POV because > now we end up with lots of individual, filehandle

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread NeilBrown
On Wed, 13 Dec 2023, Dave Chinner wrote: > On Tue, Dec 12, 2023 at 10:21:53AM -0500, Kent Overstreet wrote: > > On Tue, Dec 12, 2023 at 04:53:28PM +1100, Dave Chinner wrote: > > > Doesn't anyone else see or hear the elephant trumpeting loudly in > > > the middle of the room? > > > > > > I mean,

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread NeilBrown
On Wed, 13 Dec 2023, Miklos Szeredi wrote: > On Tue, 12 Dec 2023 at 17:08, Kent Overstreet > wrote: > > > In short, STATX_ATTR_INUM_NOT_UNIQUE is required to tell userspace when > > they _must_ do the new thing if they care about correctness; it provides > > a way to tell userspace what

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
On Wed, Dec 13, 2023 at 07:48:16AM +1100, Dave Chinner wrote: > On Tue, Dec 12, 2023 at 10:21:53AM -0500, Kent Overstreet wrote: > > On Tue, Dec 12, 2023 at 04:53:28PM +1100, Dave Chinner wrote: > > > Doesn't anyone else see or hear the elephant trumpeting loudly in > > > the middle of the room? >

Re: file handle in statx

2023-12-12 Thread Dave Chinner
On Tue, Dec 12, 2023 at 09:15:29AM -0800, Frank Filz wrote: > > On Tue, Dec 12, 2023 at 10:10:23AM +0100, Donald Buczek wrote: > > > On 12/12/23 06:53, Dave Chinner wrote: > > > > > > > So can someone please explain to me why we need to try to re-invent > > > > a generic filehandle concept in

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Dave Chinner
On Tue, Dec 12, 2023 at 10:21:53AM -0500, Kent Overstreet wrote: > On Tue, Dec 12, 2023 at 04:53:28PM +1100, Dave Chinner wrote: > > Doesn't anyone else see or hear the elephant trumpeting loudly in > > the middle of the room? > > > > I mean, we already have name_to_handle_at() for userspace to

RE: file handle in statx

2023-12-12 Thread Frank Filz
> On Tue, Dec 12, 2023 at 7:44 PM Kent Overstreet > wrote: > > > > On Tue, Dec 12, 2023 at 09:15:29AM -0800, Frank Filz wrote: > > > > On Tue, Dec 12, 2023 at 10:10:23AM +0100, Donald Buczek wrote: > > > > > On 12/12/23 06:53, Dave Chinner wrote: > > > > > > > > > > > So can someone please

Re: file handle in statx

2023-12-12 Thread Amir Goldstein
On Tue, Dec 12, 2023 at 7:44 PM Kent Overstreet wrote: > > On Tue, Dec 12, 2023 at 09:15:29AM -0800, Frank Filz wrote: > > > On Tue, Dec 12, 2023 at 10:10:23AM +0100, Donald Buczek wrote: > > > > On 12/12/23 06:53, Dave Chinner wrote: > > > > > > > > > So can someone please explain to me why we

Re: file handle in statx

2023-12-12 Thread Kent Overstreet
On Tue, Dec 12, 2023 at 09:15:29AM -0800, Frank Filz wrote: > > On Tue, Dec 12, 2023 at 10:10:23AM +0100, Donald Buczek wrote: > > > On 12/12/23 06:53, Dave Chinner wrote: > > > > > > > So can someone please explain to me why we need to try to re-invent > > > > a generic filehandle concept in

RE: file handle in statx

2023-12-12 Thread Frank Filz
> On Tue, Dec 12, 2023 at 10:10:23AM +0100, Donald Buczek wrote: > > On 12/12/23 06:53, Dave Chinner wrote: > > > > > So can someone please explain to me why we need to try to re-invent > > > a generic filehandle concept in statx when we already have a have > > > working and widely supported user

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
On Tue, Dec 12, 2023 at 05:30:23PM +0100, Miklos Szeredi wrote: > On Tue, 12 Dec 2023 at 17:08, Kent Overstreet > wrote: > > > In short, STATX_ATTR_INUM_NOT_UNIQUE is required to tell userspace when > > they _must_ do the new thing if they care about correctness; it provides > > a way to tell

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Miklos Szeredi
On Tue, 12 Dec 2023 at 17:08, Kent Overstreet wrote: > In short, STATX_ATTR_INUM_NOT_UNIQUE is required to tell userspace when > they _must_ do the new thing if they care about correctness; it provides > a way to tell userspace what guarantees we're able to provide. That flag would not help

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
On Tue, Dec 12, 2023 at 04:57:41PM +0100, Miklos Szeredi wrote: > On Tue, 12 Dec 2023 at 16:43, Kent Overstreet > wrote: > > > > On Tue, Dec 12, 2023 at 04:38:29PM +0100, Miklos Szeredi wrote: > > > On Tue, 12 Dec 2023 at 16:35, Kent Overstreet > > > wrote: > > > > > > > Other poeple have been

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Miklos Szeredi
On Tue, 12 Dec 2023 at 16:43, Kent Overstreet wrote: > > On Tue, Dec 12, 2023 at 04:38:29PM +0100, Miklos Szeredi wrote: > > On Tue, 12 Dec 2023 at 16:35, Kent Overstreet > > wrote: > > > > > Other poeple have been finding ways to contribute to the technical > > > discussion; just calling

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
On Tue, Dec 12, 2023 at 04:38:29PM +0100, Miklos Szeredi wrote: > On Tue, 12 Dec 2023 at 16:35, Kent Overstreet > wrote: > > > Other poeple have been finding ways to contribute to the technical > > discussion; just calling things "ugly and broken" does not. > > Kent, calm down please. We call

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Miklos Szeredi
On Tue, 12 Dec 2023 at 16:35, Kent Overstreet wrote: > Other poeple have been finding ways to contribute to the technical > discussion; just calling things "ugly and broken" does not. Kent, calm down please. We call things "ugly and broken" all the time. That's just an opinion, you are free

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
On Tue, Dec 12, 2023 at 04:29:09PM +0100, Christian Brauner wrote: > On Tue, Dec 12, 2023 at 10:16:31AM -0500, Kent Overstreet wrote: > > On Tue, Dec 12, 2023 at 09:56:45AM +0100, Christian Brauner wrote: > > > On Tue, Dec 12, 2023 at 08:32:55AM +0200, Amir Goldstein wrote: > > > > > >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Christian Brauner
On Tue, Dec 12, 2023 at 10:16:31AM -0500, Kent Overstreet wrote: > On Tue, Dec 12, 2023 at 09:56:45AM +0100, Christian Brauner wrote: > > On Tue, Dec 12, 2023 at 08:32:55AM +0200, Amir Goldstein wrote: > > > > > STATX_ATTR_INUM_NOT_UNIQUE - it is possible that two files have the > > > > >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
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 wrote: > > > > > > On Tue, Dec 12, 2023 at 09:10:47AM +, David Howells wrote: > > > > Christian Brauner

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Christian Brauner
On Tue, Dec 12, 2023 at 03:06:07PM +0100, Miklos Szeredi wrote: > On Tue, 12 Dec 2023 at 14:48, Christian Brauner wrote: > > > Exposing the subvolume id in statx() is still fine imho. It's a concept > > shared between btrfs and bcachefs and it's pretty useful for interested > > userspace that

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
On Tue, Dec 12, 2023 at 04:53:28PM +1100, Dave Chinner wrote: > Doesn't anyone else see or hear the elephant trumpeting loudly in > the middle of the room? > > I mean, we already have name_to_handle_at() for userspace to get a > unique, opaque, filesystem defined file handle for any given file. >

Re: file handle in statx

2023-12-12 Thread Theodore Ts'o
On Tue, Dec 12, 2023 at 10:10:23AM +0100, Donald Buczek wrote: > On 12/12/23 06:53, Dave Chinner wrote: > > > So can someone please explain to me why we need to try to re-invent > > a generic filehandle concept in statx when we already have a > > have working and widely supported user API that

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Kent Overstreet
On Tue, Dec 12, 2023 at 09:56:45AM +0100, Christian Brauner wrote: > On Tue, Dec 12, 2023 at 08:32:55AM +0200, Amir Goldstein wrote: > > > > STATX_ATTR_INUM_NOT_UNIQUE - it is possible that two files have the > > > > same inode number > > This is just ugly with

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Miklos Szeredi
On Tue, 12 Dec 2023 at 14:48, Christian Brauner wrote: > Exposing the subvolume id in statx() is still fine imho. It's a concept > shared between btrfs and bcachefs and it's pretty useful for interested > userspace that wants to make use of these apis. Exposing subvolume ID should be okay, as

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Christian Brauner
On Tue, Dec 12, 2023 at 10:42:58AM +0100, Miklos Szeredi wrote: > On Tue, 12 Dec 2023 at 10:35, Christian Brauner wrote: > > > 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

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread David Howells
Christian Brauner wrote: > > 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

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Miklos Szeredi
On Tue, 12 Dec 2023 at 10:35, Christian Brauner wrote: > 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

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Christian Brauner
On Tue, Dec 12, 2023 at 10:28:12AM +0100, Miklos Szeredi wrote: > On Tue, 12 Dec 2023 at 10:23, Christian Brauner wrote: > > > > On Tue, Dec 12, 2023 at 09:10:47AM +, David Howells wrote: > > > Christian Brauner wrote: > > > > > > > > > > I suggest: > > > > > > > > > > > > > >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Miklos Szeredi
On Tue, 12 Dec 2023 at 10:23, Christian Brauner wrote: > > On Tue, Dec 12, 2023 at 09:10:47AM +, David Howells wrote: > > Christian Brauner wrote: > > > > > > > > I suggest: > > > > > > > > > > > > STATX_ATTR_INUM_NOT_UNIQUE - it is possible that two files have the > > > > > >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Christian Brauner
On Tue, Dec 12, 2023 at 09:10:47AM +, David Howells wrote: > Christian Brauner wrote: > > > > > > I suggest: > > > > > > > > > > STATX_ATTR_INUM_NOT_UNIQUE - it is possible that two files have the > > > > > same inode number > > > > This is just ugly with

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread David Howells
Christian Brauner 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

Re: file handle in statx

2023-12-12 Thread Donald Buczek
On 12/12/23 06:53, Dave Chinner wrote: > So can someone please explain to me why we need to try to re-invent > a generic filehandle concept in statx when we already have a > have working and widely supported user API that provides exactly > this functionality? name_to_handle_at() is fine, but

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Christian Brauner
On Tue, Dec 12, 2023 at 01:13:07PM +1100, NeilBrown wrote: > On Tue, 12 Dec 2023, Kent Overstreet wrote: > > On Tue, Dec 12, 2023 at 11:59:51AM +1100, NeilBrown wrote: > > > On Tue, 12 Dec 2023, Kent Overstreet wrote: > > > > NFSv4 specs that for the maximum size? That is pretty hefty... > > > >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-12 Thread Christian Brauner
On Tue, Dec 12, 2023 at 08:32:55AM +0200, Amir Goldstein wrote: > On Tue, Dec 12, 2023 at 7:53 AM Dave Chinner wrote: > > > > On Tue, Dec 12, 2023 at 11:59:51AM +1100, NeilBrown wrote: > > > On Tue, 12 Dec 2023, Kent Overstreet wrote: > > > > On Tue, Dec 12, 2023 at 10:53:07AM +1100, NeilBrown

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread David Howells
Dave Chinner wrote: > I mean, we already have name_to_handle_at() for userspace to get a > unique, opaque, filesystem defined file handle for any given file. > It's the same filehandle that filesystems hand to the nfsd so nfs > clients can uniquely identify the file they are asking the nfsd to >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread Amir Goldstein
On Tue, Dec 12, 2023 at 7:53 AM Dave Chinner wrote: > > On Tue, Dec 12, 2023 at 11:59:51AM +1100, NeilBrown wrote: > > On Tue, 12 Dec 2023, Kent Overstreet wrote: > > > On Tue, Dec 12, 2023 at 10:53:07AM +1100, NeilBrown wrote: > > > > On Tue, 12 Dec 2023, Kent Overstreet wrote: > > > > > On Tue,

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread Dave Chinner
On Tue, Dec 12, 2023 at 11:59:51AM +1100, NeilBrown wrote: > On Tue, 12 Dec 2023, Kent Overstreet wrote: > > On Tue, Dec 12, 2023 at 10:53:07AM +1100, NeilBrown wrote: > > > On Tue, 12 Dec 2023, Kent Overstreet wrote: > > > > On Tue, Dec 12, 2023 at 09:43:27AM +1100, NeilBrown wrote: > > > > > On

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread Kent Overstreet
On Tue, Dec 12, 2023 at 01:13:07PM +1100, NeilBrown wrote: > On Tue, 12 Dec 2023, Kent Overstreet wrote: > > I suppose if we want to be able to round trip this stuff we do need to > > allocate space for it, even if a local filesystem would never include > > it. > > > > > I suggest: > > > > > >

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread NeilBrown
On Tue, 12 Dec 2023, Kent Overstreet wrote: > On Tue, Dec 12, 2023 at 11:59:51AM +1100, NeilBrown wrote: > > On Tue, 12 Dec 2023, Kent Overstreet wrote: > > > NFSv4 specs that for the maximum size? That is pretty hefty... > > > > It is - but it needs room to identify the filesystem and it needs

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread Kent Overstreet
On Tue, Dec 12, 2023 at 11:59:51AM +1100, NeilBrown wrote: > On Tue, 12 Dec 2023, Kent Overstreet wrote: > > NFSv4 specs that for the maximum size? That is pretty hefty... > > It is - but it needs room to identify the filesystem and it needs to be > stable across time. That need is more than a

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread NeilBrown
fact, if you use the 64 bits of vfs_inode number by filling in bits > > > > from > > > > the fs-inode number from one end, and bits from the volume number from > > > > the other end, then you don't need to pre-configure how the 64 bits are > > > &

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread David Howells
NeilBrown wrote: > I'm not in favour of any filesystem depending on this for correct > functionality today. As long as the filesystem isn't so large that > inum+volnum simply cannot fit in 64 bits, we should make a reasonable > effort to present them both in 64 bits. The Auristor version of

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread Kent Overstreet
er from one end, and bits from the volume number from > > > the other end, then you don't need to pre-configure how the 64 bits are > > > shared. > > > You record inum-bits and volnum bits in the filesystem metadata, and > > > increase either as needed. Once the sum hits 64

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread NeilBrown
lesystem metadata, and > > increase either as needed. Once the sum hits 64, you start returning > > ENOSPC for new files or new volumes. > > > > There will come a day when 64 bits is not enough for inodes in a single > > filesystem. Today is not that day. &g

Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread David Howells
Kent Overstreet wrote: > I was chatting a bit with David Howells on IRC about this, and floated > adding the file handle to statx. It looks like there's enough space > reserved to make this feasible - probably going with a fixed maximum > size of 128-256 bits. We can always save

file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?)

2023-12-11 Thread Kent Overstreet
almost no room for growth and then we're back in the world where users had to guess how many inodes they were going to need in their filesystem; and if we put this off now we're just kicking the can down the road until when it becomes really pressing and urgent to solve. No, we need to come up with something better. I was chatting a bit with David Howells on IRC about this, and floated adding the file handle to statx. It looks like there's enough space reserved to make this feasible - probably going with a fixed maximum size of 128-256 bits. Thoughts?