public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: subvol qgroup lifetime invariants
@ 2024-01-20  0:55 Boris Burkov
  2024-01-20  0:55 ` [PATCH 1/2] btrfs: forbid creating subvol qgroups Boris Burkov
  2024-01-20  0:55 ` [PATCH 2/2] btrfs: forbid deleting live subvol qgroup Boris Burkov
  0 siblings, 2 replies; 12+ messages in thread
From: Boris Burkov @ 2024-01-20  0:55 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

Subvol qgroups (id 0/SUBVOLID) are special. They get created
and reaped automatically for subvols, and can never have any children by
virtue of being at level 0.

Manually managing them doesn't provide much value but does create the
possibility for weird states and races. To that end, ban deleting subvol
qgroups that still have usage and creating subvol qgroups at all.

Testing Note: this patch series breaks btrfs/303 as that test is hunting
a race to do with creating a subvol qgroup which now explicitly fails.

Boris Burkov (2):
  btrfs: forbid creating subvol qgroups
  btrfs: forbid deleting live subvol qgroup

 fs/btrfs/ioctl.c  |  5 +++++
 fs/btrfs/qgroup.c | 15 +++++++++++++++
 2 files changed, 20 insertions(+)

-- 
2.43.0


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

end of thread, other threads:[~2024-01-26 15:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-20  0:55 [PATCH 0/2] btrfs: subvol qgroup lifetime invariants Boris Burkov
2024-01-20  0:55 ` [PATCH 1/2] btrfs: forbid creating subvol qgroups Boris Burkov
2024-01-20  2:57   ` Qu Wenruo
2024-01-22 20:43   ` David Sterba
2024-01-24 12:52   ` Neal Gompa
2024-01-24 16:36     ` David Sterba
2024-01-25  3:32       ` Neal Gompa
2024-01-25 23:12         ` Boris Burkov
2024-01-26 15:50           ` Neal Gompa
2024-01-20  0:55 ` [PATCH 2/2] btrfs: forbid deleting live subvol qgroup Boris Burkov
2024-01-20  2:58   ` Qu Wenruo
2024-01-22 20:43   ` David Sterba

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