public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
* How to cope with subvolumes and snapshots on muti-user systems?
@ 2023-11-28  7:49 Donald Buczek
  2023-11-29 21:43 ` Kent Overstreet
  0 siblings, 1 reply; 92+ messages in thread
From: Donald Buczek @ 2023-11-28  7:49 UTC (permalink / raw)
  To: linux-bcachefs; +Cc: Stefan Krueger

Hi,

I'm happy, bcachefs finally made it to mainline, Kudos to Kent!

As far as I know, there is an ongoing discussion about the problems of non-unique inode numbers exposed by snapshots an no real conclusion yet, on how filesystems should expose snapshots.

The current behavior is kind of a showstopper for us, because we are still running multi-user systems. The problem is, that any unprivileged user can create subvolumes and snapshots:

     buczek@dose:/scratch/local3$ bcachefs subvolume create vol1
     buczek@dose:/scratch/local3$ mkdir vol1/dir1
     buczek@dose:/scratch/local3$ bcachefs subvolume snapshot vol1/snp1
     buczek@dose:/scratch/local3$ ls -li vol1/
     total 0
     1342189197 drwxrwxr-x 2 buczek buczek 0 Nov 20 15:01 dir1
     1476413180 drwxrwxr-x 3 buczek buczek 0 Nov 20 15:01 snp1
     buczek@dose:/scratch/local3$ ls -li vol1/snp1/
     total 0
     1342189197 drwxrwxr-x 2 buczek buczek 0 Nov 20 15:01 dir1
     buczek@dose:/scratch/local3$ find .
     .
     ./vol1
     find: File system loop detected; ‘./vol1/snp1’ is part of the same file system loop as ‘./vol1’.
     ./vol1/dir1
     buczek@dose:/scratch/local3$

We have a few tools which walk over the filesystem (backup, mirror, accounting) and these are just not prepared for non-unique inode numbers aside from regular hardlinks. I'm concerned that experiments of a unprivileged users could make important tools to fail.

Questions:

- Would it be a workaround to make creation of subvolumes and snapshots privileged operations?

- If we want to evolve our tools: What is the best way for userspace to recognize subvolumes and snapshots and tell them apart from ordinary directories?

Thanks

   Donald

-- 
Donald Buczek
buczek@molgen.mpg.de
Tel: +49 30 8413 1433

^ permalink raw reply	[flat|nested] 92+ messages in thread

end of thread, other threads:[~2023-12-19  7:42 UTC | newest]

Thread overview: 92+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28  7:49 How to cope with subvolumes and snapshots on muti-user systems? Donald Buczek
2023-11-29 21:43 ` Kent Overstreet
2023-11-30  7:35   ` Donald Buczek
2023-11-30  7:39     ` Kent Overstreet
2023-11-30 20:37       ` NeilBrown
2023-12-04 10:47         ` Donald Buczek
2023-12-04 22:45           ` NeilBrown
2023-12-05 21:35             ` Donald Buczek
2023-12-05 22:01               ` NeilBrown
2023-12-07 11:53                 ` Donald Buczek
2023-12-08  1:16                   ` NeilBrown
2023-12-08  1:37                     ` Kent Overstreet
2023-12-08  2:13                       ` NeilBrown
2023-12-08  2:49                         ` Kent Overstreet
2023-12-08 11:34                           ` Donald Buczek
2023-12-08 20:02                             ` Kent Overstreet
2023-12-11 22:43                               ` NeilBrown
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: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
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  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
2023-12-12  9:46                                                   ` David Howells
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  7:03                                           ` 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  0:25                                     ` David Howells
2023-12-13 12:43                                 ` How to cope with subvolumes and snapshots on muti-user systems? Donald Buczek
2023-11-30 20:36   ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox