btrfs: remove unused qgroup members from btrfs_trans_handle
authorDavid Sterba <dsterba@suse.com>
Wed, 15 Mar 2017 15:17:03 +0000 (16:17 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Apr 2017 12:07:25 +0000 (14:07 +0200)
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>
fs/btrfs/extent-tree.c
fs/btrfs/qgroup.c
fs/btrfs/qgroup.h
fs/btrfs/tests/btrfs-tests.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h

index 1b9ede123ffb7bf356e5ba70eddc3ff6f1c6bd92..e870e60e33bcf4b274f6931c20f497abc579f1f6 100644 (file)
@@ -3003,7 +3003,6 @@ again:
                goto again;
        }
 out:
-       assert_qgroups_uptodate(trans);
        trans->can_flush_pending_bgs = can_flush_pending_bgs;
        return 0;
 }
index a59801dc2a340bcd3c5a34af9ef7277061967377..b2fdefc6d191fb2755f65f3bff8eb6e1556389a0 100644 (file)
@@ -2487,18 +2487,6 @@ out:
        spin_unlock(&fs_info->qgroup_lock);
 }
 
-void assert_qgroups_uptodate(struct btrfs_trans_handle *trans)
-{
-       if (list_empty(&trans->qgroup_ref_list) && !trans->delayed_ref_elem.seq)
-               return;
-       btrfs_err(trans->fs_info,
-               "qgroups not uptodate in trans handle %p:  list is%s empty, seq is %#x.%x",
-               trans, list_empty(&trans->qgroup_ref_list) ? "" : " not",
-               (u32)(trans->delayed_ref_elem.seq >> 32),
-               (u32)trans->delayed_ref_elem.seq);
-       BUG();
-}
-
 /*
  * returns < 0 on error, 0 when more leafs are to be scanned.
  * returns 1 when done.
index 26932a8a19930bc48ff14ad3c154a7326ce3a111..96fc56ebf55af88a05e3f6eaa9bd39bbb8b1128c 100644 (file)
@@ -196,7 +196,6 @@ static inline void btrfs_qgroup_free_delayed_ref(struct btrfs_fs_info *fs_info,
        btrfs_qgroup_free_refroot(fs_info, ref_root, num_bytes);
        trace_btrfs_qgroup_free_delayed_ref(fs_info, ref_root, num_bytes);
 }
-void assert_qgroups_uptodate(struct btrfs_trans_handle *trans);
 
 #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
 int btrfs_verify_qgroup_counts(struct btrfs_fs_info *fs_info, u64 qgroupid,
index ea272432c9305177a1059db321f8aae6f89a09f3..b18ab8f327a53dd10b09bee6169f34ecff5eb809 100644 (file)
@@ -237,7 +237,6 @@ void btrfs_init_dummy_trans(struct btrfs_trans_handle *trans)
 {
        memset(trans, 0, sizeof(*trans));
        trans->transid = 1;
-       INIT_LIST_HEAD(&trans->qgroup_ref_list);
        trans->type = __TRANS_DUMMY;
 }
 
index a7d7a7d1d78a541713500b4e4252596cefea0816..ee5844855c1593e9e6e3524ff4c6fbe3164dc259 100644 (file)
@@ -572,7 +572,6 @@ again:
 
        h->type = type;
        h->can_flush_pending_bgs = true;
-       INIT_LIST_HEAD(&h->qgroup_ref_list);
        INIT_LIST_HEAD(&h->new_bgs);
 
        smp_mb();
@@ -917,7 +916,6 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
                wake_up_process(info->transaction_kthread);
                err = -EIO;
        }
-       assert_qgroups_uptodate(trans);
 
        kmem_cache_free(btrfs_trans_handle_cachep, trans);
        if (must_run_delayed_refs) {
@@ -2223,7 +2221,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
 
        switch_commit_roots(cur_trans, fs_info);
 
-       assert_qgroups_uptodate(trans);
        ASSERT(list_empty(&cur_trans->dirty_bgs));
        ASSERT(list_empty(&cur_trans->io_bgs));
        update_super_roots(fs_info);
index 902619f83db650be5c3fafab1cec86d54709f52d..c55e44560103b48e2a917701899c611732d8a013 100644 (file)
@@ -127,8 +127,6 @@ struct btrfs_trans_handle {
        unsigned int type;
        struct btrfs_root *root;
        struct btrfs_fs_info *fs_info;
-       struct seq_list delayed_ref_elem;
-       struct list_head qgroup_ref_list;
        struct list_head new_bgs;
 };