aboutsummaryrefslogtreecommitdiff
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorBoris Burkov <[email protected]>2024-05-09 15:34:40 -0700
committerDavid Sterba <[email protected]>2024-05-15 17:57:09 +0200
commit2b8aa78cf1279ec5e418baa26bfed5df682568d8 (patch)
tree2bf02e8017b49a5d779303192b892a06689003ab /lib/debugobjects.c
parent1fa7603d569b9e738e9581937ba8725cd7d39b48 (diff)
btrfs: qgroup: fix qgroup id collision across mounts
If we delete subvolumes whose ID is the largest in the filesystem, then unmount and mount again, then btrfs_init_root_free_objectid on the tree_root will select a subvolid smaller than that one and thus allow reusing it. If we are also using qgroups (and particularly squotas) it is possible to delete the subvol without deleting the qgroup. In that case, we will be able to create a new subvol whose id already has a level 0 qgroup. This will result in re-using that qgroup which would then lead to incorrect accounting. Fixes: 6ed05643ddb1 ("btrfs: create qgroup earlier in snapshot creation") CC: [email protected] # 6.7+ Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Boris Burkov <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions