Re: [PATCH v2] btrfs: qgroups: Move transaction management inside btrfs_quota_enable/disable

2018-07-05 Thread David Sterba
On Thu, Jul 05, 2018 at 02:50:48PM +0300, Nikolay Borisov wrote: > Commit 5d23515be669 ("btrfs: Move qgroup rescan on quota enable to > btrfs_quota_enable") not only resulted in an easier to follow code but > it also introduced a subtle bug. It changed the timing when the initial > transaction

Re: [PATCH v2] btrfs: qgroups: Move transaction management inside btrfs_quota_enable/disable

2018-07-05 Thread David Sterba
On Thu, Jul 05, 2018 at 02:50:48PM +0300, Nikolay Borisov wrote: > @@ -921,8 +938,10 @@ int btrfs_quota_enable(struct btrfs_trans_handle *trans, > > ret = btrfs_insert_empty_item(trans, quota_root, path, , > sizeof(*ptr)); > - if (ret) > + if

Re: [PATCH v2] btrfs: qgroups: Move transaction management inside btrfs_quota_enable/disable

2018-07-05 Thread Nikolay Borisov
On 5.07.2018 14:50, Nikolay Borisov wrote: > Commit 5d23515be669 ("btrfs: Move qgroup rescan on quota enable to > btrfs_quota_enable") not only resulted in an easier to follow code but > it also introduced a subtle bug. It changed the timing when the initial > transaction rescan was happening

[PATCH v2] btrfs: qgroups: Move transaction management inside btrfs_quota_enable/disable

2018-07-05 Thread Nikolay Borisov
Commit 5d23515be669 ("btrfs: Move qgroup rescan on quota enable to btrfs_quota_enable") not only resulted in an easier to follow code but it also introduced a subtle bug. It changed the timing when the initial transaction rescan was happening - before the commit it would happen after transaction