* [PATCH] btrfs: no need to run delayed refs after commit_fs_roots
@ 2021-01-08 16:23 David Sterba
2021-01-11 15:54 ` Nikolay Borisov
0 siblings, 1 reply; 2+ messages in thread
From: David Sterba @ 2021-01-08 16:23 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
The inode number cache has been removed in this dev cycle, there's one
more leftover. We don't need to run the delayed refs again after
commit_fs_roots as stated in the comment, because btrfs_save_ino_cache
is no more since 5297199a8bca ("btrfs: remove inode number cache
feature").
Nothing else between commit_fs_roots and btrfs_qgroup_account_extents
could create new delayed refs so the qgroup consistency should be safe.
Signed-off-by: David Sterba <dsterba@suse.com>
---
There's the patchset
https://lore.kernel.org/linux-btrfs/cover.1608319304.git.josef@toxicpanda.com/
to remove several other run delayed ref calls. I haven't spotted any
problems so this patch can go in now as it's related to the inode cache
removal. The patchset unifies the location of delayed refs calls so this
one would be an outlier anyway.
fs/btrfs/transaction.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 4ffe66164fa3..3bcb5444536e 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -2265,14 +2265,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
*/
btrfs_free_log_root_tree(trans, fs_info);
- /*
- * commit_fs_roots() can call btrfs_save_ino_cache(), which generates
- * new delayed refs. Must handle them or qgroup can be wrong.
- */
- ret = btrfs_run_delayed_refs(trans, (unsigned long)-1);
- if (ret)
- goto unlock_tree_log;
-
/*
* Since fs roots are all committed, we can get a quite accurate
* new_roots. So let's do quota accounting.
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: no need to run delayed refs after commit_fs_roots
2021-01-08 16:23 [PATCH] btrfs: no need to run delayed refs after commit_fs_roots David Sterba
@ 2021-01-11 15:54 ` Nikolay Borisov
0 siblings, 0 replies; 2+ messages in thread
From: Nikolay Borisov @ 2021-01-11 15:54 UTC (permalink / raw)
To: David Sterba, linux-btrfs
On 8.01.21 г. 18:23 ч., David Sterba wrote:
> The inode number cache has been removed in this dev cycle, there's one
> more leftover. We don't need to run the delayed refs again after
> commit_fs_roots as stated in the comment, because btrfs_save_ino_cache
> is no more since 5297199a8bca ("btrfs: remove inode number cache
> feature").
>
> Nothing else between commit_fs_roots and btrfs_qgroup_account_extents
> could create new delayed refs so the qgroup consistency should be safe.
>
> Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-11 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-08 16:23 [PATCH] btrfs: no need to run delayed refs after commit_fs_roots David Sterba
2021-01-11 15:54 ` Nikolay Borisov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox