summaryrefslogtreecommitdiff
path: root/fs/btrfs/subpage.h
diff options
context:
space:
mode:
authorBoris Burkov <boris@bur.io>2024-05-09 15:34:40 -0700
committerDavid Sterba <dsterba@suse.com>2024-05-15 17:57:09 +0200
commit2b8aa78cf1279ec5e418baa26bfed5df682568d8 (patch)
tree2bf02e8017b49a5d779303192b892a06689003ab /fs/btrfs/subpage.h
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: stable@vger.kernel.org # 6.7+ Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Boris Burkov <boris@bur.io> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/subpage.h')
0 files changed, 0 insertions, 0 deletions