Nikolay Borisov 5d23515be6 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>
2018-03-26 15:09:38 +02:00
..
2018-02-06 14:43:37 +00:00
2018-02-07 14:25:22 -08:00
2018-02-07 14:25:22 -08:00
2017-11-16 11:41:22 -08:00
2018-01-24 17:33:57 -05:00
2018-02-06 18:32:45 -08:00
2018-01-01 10:09:33 -05:00
2018-03-07 11:47:15 +01:00
2018-02-07 14:25:22 -08:00
2017-09-04 19:05:15 -04:00
2018-02-06 18:32:45 -08:00
2018-01-03 10:13:36 -08:00
2017-12-07 14:23:30 -05:00
2018-01-29 07:27:24 -08:00
2018-02-06 10:41:33 -08:00
2018-02-08 15:18:32 -08:00
2017-12-09 20:16:33 -05:00