btrfs: remove unused btrfs_root::defrag_trans_start
David Sterba
maintainerPATCH 1/1 btrfs: remove unused btrfs_root::defrag_trans_start
Last touched in 2013 by commit de78b51a2852 ("btrfs: remove cache only arguments from defrag path") that was the only code that used the value. Now it's only set but never used for anything, so we can remove it.
Signed-off-by David Sterba <[email protected]>
--- fs/btrfs/ctree.h | 1 - fs/btrfs/disk-io.c | 4 ---- fs/btrfs/tree-defrag.c | 5 ++--- 3 files changed, 2 insertions(+), 8 deletions(-)
fs/btrfs/ctree.h +0 -1
@@ -1075,7 +1075,6 @@ struct btrfs_root {u64 highest_objectid; -u64 defrag_trans_start;struct btrfs_key defrag_progress;struct btrfs_key defrag_max;
fs/btrfs/disk-io.c +0 -4
@@ -1141,10 +1141,6 @@ static void __setup_root(struct btrfs_root *root, struct btrfs_fs_info *fs_info,memset (&root->root_key,0 ,sizeof (root->root_key));memset (&root->root_item,0 ,sizeof (root->root_item));memset (&root->defrag_progress,0 ,sizeof (root->defrag_progress)); -if (!dummy) - root->defrag_trans_start = fs_info->generation; -else - root->defrag_trans_start =0 ; root->root_key.objectid = objectid; root->anon_dev =0 ;
fs/btrfs/tree-defrag.c +2 -3
@@ -133,10 +133,9 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, ret =0 ; } done: -if (ret != -EAGAIN ) { +if (ret != -EAGAIN )memset (&root->defrag_progress,0 ,sizeof (root->defrag_progress)); - root->defrag_trans_start = trans->transid; - } +return ret; }
Signature · 1 line
2.25.0
Quoted 5 lines · David Sterba
Last touched in 2013 by commit
de78b51a2852("btrfs: remove cache only arguments from defrag path") that was the only code that used the value. Now it's only set but never used for anything, so we can remove it.Signed-off-by David Sterba <[email protected]>
Reviewed-by Nikolay Borisov <[email protected]>
Looks good.
Reviewed-by Anand Jain <[email protected]>