aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-03-15 11:17:03 -0400
committerDavid Sterba <dsterba@suse.com>2017-04-18 08:07:25 -0400
commitf486135ebab4fb91366a1e41fb15ed3036ad0cf9 (patch)
tree92a2dd7b14a0435fbdc359fc7985adb8a9dd169f /fs/btrfs
parent994a5d2bc758792f1808d7b112990a14182ef847 (diff)
btrfs: remove unused qgroup members from btrfs_trans_handle
The members have been effectively unused since "Btrfs: rework qgroup accounting" (fcebe4562dec83b3), there's no substitute for assert_qgroups_uptodate so it's removed as well. Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/extent-tree.c1
-rw-r--r--fs/btrfs/qgroup.c12
-rw-r--r--fs/btrfs/qgroup.h1
-rw-r--r--fs/btrfs/tests/btrfs-tests.c1
-rw-r--r--fs/btrfs/transaction.c3
-rw-r--r--fs/btrfs/transaction.h2
6 files changed, 0 insertions, 20 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 1b9ede123ffb..e870e60e33bc 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3003,7 +3003,6 @@ again:
3003 goto again; 3003 goto again;
3004 } 3004 }
3005out: 3005out:
3006 assert_qgroups_uptodate(trans);
3007 trans->can_flush_pending_bgs = can_flush_pending_bgs; 3006 trans->can_flush_pending_bgs = can_flush_pending_bgs;
3008 return 0; 3007 return 0;
3009} 3008}
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index a59801dc2a34..b2fdefc6d191 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -2487,18 +2487,6 @@ out:
2487 spin_unlock(&fs_info->qgroup_lock); 2487 spin_unlock(&fs_info->qgroup_lock);
2488} 2488}
2489 2489
2490void assert_qgroups_uptodate(struct btrfs_trans_handle *trans)
2491{
2492 if (list_empty(&trans->qgroup_ref_list) && !trans->delayed_ref_elem.seq)
2493 return;
2494 btrfs_err(trans->fs_info,
2495 "qgroups not uptodate in trans handle %p: list is%s empty, seq is %#x.%x",
2496 trans, list_empty(&trans->qgroup_ref_list) ? "" : " not",
2497 (u32)(trans->delayed_ref_elem.seq >> 32),
2498 (u32)trans->delayed_ref_elem.seq);
2499 BUG();
2500}
2501
2502/* 2490/*
2503 * returns < 0 on error, 0 when more leafs are to be scanned. 2491 * returns < 0 on error, 0 when more leafs are to be scanned.
2504 * returns 1 when done. 2492 * returns 1 when done.
diff --git a/fs/btrfs/qgroup.h b/fs/btrfs/qgroup.h
index 26932a8a1993..96fc56ebf55a 100644
--- a/fs/btrfs/qgroup.h
+++ b/fs/btrfs/qgroup.h
@@ -196,7 +196,6 @@ static inline void btrfs_qgroup_free_delayed_ref(struct btrfs_fs_info *fs_info,
196 btrfs_qgroup_free_refroot(fs_info, ref_root, num_bytes); 196 btrfs_qgroup_free_refroot(fs_info, ref_root, num_bytes);
197 trace_btrfs_qgroup_free_delayed_ref(fs_info, ref_root, num_bytes); 197 trace_btrfs_qgroup_free_delayed_ref(fs_info, ref_root, num_bytes);
198} 198}
199void assert_qgroups_uptodate(struct btrfs_trans_handle *trans);
200 199
201#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS 200#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
202int btrfs_verify_qgroup_counts(struct btrfs_fs_info *fs_info, u64 qgroupid, 201int btrfs_verify_qgroup_counts(struct btrfs_fs_info *fs_info, u64 qgroupid,
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
index ea272432c930..b18ab8f327a5 100644
--- a/fs/btrfs/tests/btrfs-tests.c
+++ b/fs/btrfs/tests/btrfs-tests.c
@@ -237,7 +237,6 @@ void btrfs_init_dummy_trans(struct btrfs_trans_handle *trans)
237{ 237{
238 memset(trans, 0, sizeof(*trans)); 238 memset(trans, 0, sizeof(*trans));
239 trans->transid = 1; 239 trans->transid = 1;
240 INIT_LIST_HEAD(&trans->qgroup_ref_list);
241 trans->type = __TRANS_DUMMY; 240 trans->type = __TRANS_DUMMY;
242} 241}
243 242
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index a7d7a7d1d78a..ee5844855c15 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -572,7 +572,6 @@ again:
572 572
573 h->type = type; 573 h->type = type;
574 h->can_flush_pending_bgs = true; 574 h->can_flush_pending_bgs = true;
575 INIT_LIST_HEAD(&h->qgroup_ref_list);
576 INIT_LIST_HEAD(&h->new_bgs); 575 INIT_LIST_HEAD(&h->new_bgs);
577 576
578 smp_mb(); 577 smp_mb();
@@ -917,7 +916,6 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
917 wake_up_process(info->transaction_kthread); 916 wake_up_process(info->transaction_kthread);
918 err = -EIO; 917 err = -EIO;
919 } 918 }
920 assert_qgroups_uptodate(trans);
921 919
922 kmem_cache_free(btrfs_trans_handle_cachep, trans); 920 kmem_cache_free(btrfs_trans_handle_cachep, trans);
923 if (must_run_delayed_refs) { 921 if (must_run_delayed_refs) {
@@ -2223,7 +2221,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
2223 2221
2224 switch_commit_roots(cur_trans, fs_info); 2222 switch_commit_roots(cur_trans, fs_info);
2225 2223
2226 assert_qgroups_uptodate(trans);
2227 ASSERT(list_empty(&cur_trans->dirty_bgs)); 2224 ASSERT(list_empty(&cur_trans->dirty_bgs));
2228 ASSERT(list_empty(&cur_trans->io_bgs)); 2225 ASSERT(list_empty(&cur_trans->io_bgs));
2229 update_super_roots(fs_info); 2226 update_super_roots(fs_info);
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
index 902619f83db6..c55e44560103 100644
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -127,8 +127,6 @@ struct btrfs_trans_handle {
127 unsigned int type; 127 unsigned int type;
128 struct btrfs_root *root; 128 struct btrfs_root *root;
129 struct btrfs_fs_info *fs_info; 129 struct btrfs_fs_info *fs_info;
130 struct seq_list delayed_ref_elem;
131 struct list_head qgroup_ref_list;
132 struct list_head new_bgs; 130 struct list_head new_bgs;
133}; 131};
134 132