summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent_map.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-01-31 11:52:04 +0300
committerDavid Sterba <dsterba@suse.com>2018-03-26 16:09:38 +0300
commit5d23515be66904fa3b1b5d6bd72d2199cd2447ab (patch)
tree5b3788f6fd8f308ed1c4478299e2aa447d3aa50d /fs/btrfs/extent_map.c
parent7ce311d552e473a5176f8bb143fb45de64b8bd81 (diff)
downloadlinux-5d23515be66904fa3b1b5d6bd72d2199cd2447ab.tar.xz
btrfs: Move qgroup rescan on quota enable to btrfs_quota_enable
Currently btrfs_run_qgroups is doing a bit too much. Not only is it responsible for synchronizing in-memory state of qgroups to disk but it also contains code to trigger the initial qgroup rescan when quota is enabled initially. This condition is detected by checking that BTRFS_FS_QUOTA_ENABLED is not set and BTRFS_FS_QUOTA_ENABLING is set. Nothing really requires from the code to be structured (and scattered) the way it is so let's streamline things. First move the quota rescan code into btrfs_quota_enable, where its invocation is closer to the use. This also makes the FS_QUOTA_ENABLING flag redundant so let's remove it as well. This has been tested with a full xfstest run with qgroups enabled on the scratch device of every xfstest and no regressions were observed. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_map.c')
0 files changed, 0 insertions, 0 deletions