btrfs: remove call to btrfs_delete_unused_bgs() in close_ctree()
PATCH 1/1 btrfs: remove call to btrfs_delete_unused_bgs() in close_ctree()
btrfs_delete_unused_bgs() returns early if the filesystem is closing, so the call in close_ctree() will always do nothing.
--- fs/btrfs/disk-io.c | 6 ------ 1 file changed, 6 deletions(-)
fs/btrfs/disk-io.c +0 -6
@@ -4412,12 +4412,6 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)btrfs_discard_cleanup (fs_info);if (!sb_rdonly (fs_info->sb)) { -/* -* The cleaner kthread is stopped, so do one final pass over -* unused block groups. -*/ -btrfs_delete_unused_bgs (fs_info); -/* * There might be existing delayed inode workers still running * and holding an empty delayed inode item. We must wait for
Signature · 1 line
2.48.1
Quoted 4 lines · Mark Harmstone
btrfs_delete_unused_bgs()returns early if the filesystem is closing, so the call inclose_ctree()will always do nothing.Signed-off-by Mark Harmstone <[email protected]>
Thanks,
Qu
Quoted 21 lines
--- fs/btrfs/disk-io.c | 6 ------ 1 file changed, 6 deletions(-)fs/btrfs/disk-io.c +0
-6@@ -4412,12 +4412,6 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)btrfs_discard_cleanup (fs_info);if (!sb_rdonly (fs_info->sb)) { -/* -* The cleaner kthread is stopped, so do one final pass over -* unused block groups. -*/ -btrfs_delete_unused_bgs (fs_info); -/* * There might be existing delayed inode workers still running * and holding an empty delayed inode item. We must wait for
Quoted 4 lines · Mark Harmstone
btrfs_delete_unused_bgs()returns early if the filesystem is closing, so the call inclose_ctree()will always do nothing.Signed-off-by Mark Harmstone <[email protected]>
Looks good,
Quoted 13 lines · Mark Harmstone
btrfs_delete_unused_bgs()returns early if the filesystem is closing, so the call inclose_ctree()will always do nothing.Signed-off-by Mark Harmstone <[email protected]>--- fs/btrfs/disk-io.c | 6 ------ 1 file changed, 6 deletions(-)fs/btrfs/disk-io.c +0
-0
fs/btrfs/disk-io.c void __cold close_ctree(struct btrfs_fs_info *fs_info) · line 4419
Quoted 8 lines
fs/btrfs/disk-io.c +0
-5@@ -4412,12 +4412,6 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)btrfs_discard_cleanup (fs_info);if (!sb_rdonly (fs_info->sb)) { -/* -* The cleaner kthread is stopped, so do one final pass over -* unused block groups. -*/ -btrfs_delete_unused_bgs (fs_info);
I've checked the original commit that added it, e44163e17796 ("btrfs:
explictly delete unused block groups in close_ctree and ro-remount") and this at that time it was cleaning the unused block groups.
This changed in 2f12741f81af ("btrfs: use btrfs_fs_closing for background bg work") supposedly moving the work to a workque, so this should be reviewed again if it works as expected.