diff mbox series

btrfs: qgroup: remove obsolete fs_info members

Message ID 20190327160245.27181-1-dsterba@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs: qgroup: remove obsolete fs_info members | expand

Commit Message

David Sterba March 27, 2019, 4:02 p.m. UTC
The commit fcebe4562dec ("Btrfs: rework qgroup accounting") reworked
qgroups and added some new structures. Another rework of qgroup
mechanics e69bcee37692 ("btrfs: qgroup: Cleanup the old
ref_node-oriented mechanism.") stopped using them and left uncleaned.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/ctree.h   | 3 ---
 fs/btrfs/disk-io.c | 3 ---
 2 files changed, 6 deletions(-)

Comments

Qu Wenruo March 28, 2019, midnight UTC | #1
On 2019/3/28 上午12:02, David Sterba wrote:
> The commit fcebe4562dec ("Btrfs: rework qgroup accounting") reworked
> qgroups and added some new structures. Another rework of qgroup
> mechanics e69bcee37692 ("btrfs: qgroup: Cleanup the old
> ref_node-oriented mechanism.") stopped using them and left uncleaned.
> 
> Signed-off-by: David Sterba <dsterba@suse.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> ---
>  fs/btrfs/ctree.h   | 3 ---
>  fs/btrfs/disk-io.c | 3 ---
>  2 files changed, 6 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 1d1e12400552..5d85c55032dd 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -1092,10 +1092,7 @@ struct btrfs_fs_info {
>  
>  	/* holds configuration and tracking. Protected by qgroup_lock */
>  	struct rb_root qgroup_tree;
> -	struct rb_root qgroup_op_tree;
>  	spinlock_t qgroup_lock;
> -	spinlock_t qgroup_op_lock;
> -	atomic_t qgroup_op_seq;
>  
>  	/*
>  	 * used to avoid frequently calling ulist_alloc()/ulist_free()
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 8740152cce1f..c3b89584dad6 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -2174,7 +2174,6 @@ static void btrfs_init_qgroup(struct btrfs_fs_info *fs_info)
>  	spin_lock_init(&fs_info->qgroup_lock);
>  	mutex_init(&fs_info->qgroup_ioctl_lock);
>  	fs_info->qgroup_tree = RB_ROOT;
> -	fs_info->qgroup_op_tree = RB_ROOT;
>  	INIT_LIST_HEAD(&fs_info->dirty_qgroups);
>  	fs_info->qgroup_seq = 1;
>  	fs_info->qgroup_ulist = NULL;
> @@ -2679,7 +2678,6 @@ int open_ctree(struct super_block *sb,
>  	spin_lock_init(&fs_info->defrag_inodes_lock);
>  	spin_lock_init(&fs_info->tree_mod_seq_lock);
>  	spin_lock_init(&fs_info->super_lock);
> -	spin_lock_init(&fs_info->qgroup_op_lock);
>  	spin_lock_init(&fs_info->buffer_lock);
>  	spin_lock_init(&fs_info->unused_bgs_lock);
>  	rwlock_init(&fs_info->tree_mod_log_lock);
> @@ -2706,7 +2704,6 @@ int open_ctree(struct super_block *sb,
>  
>  	atomic_set(&fs_info->async_delalloc_pages, 0);
>  	atomic_set(&fs_info->defrag_running, 0);
> -	atomic_set(&fs_info->qgroup_op_seq, 0);
>  	atomic_set(&fs_info->reada_works_cnt, 0);
>  	atomic_set(&fs_info->nr_delayed_iputs, 0);
>  	atomic64_set(&fs_info->tree_mod_seq, 0);
>
diff mbox series

Patch

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 1d1e12400552..5d85c55032dd 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1092,10 +1092,7 @@  struct btrfs_fs_info {
 
 	/* holds configuration and tracking. Protected by qgroup_lock */
 	struct rb_root qgroup_tree;
-	struct rb_root qgroup_op_tree;
 	spinlock_t qgroup_lock;
-	spinlock_t qgroup_op_lock;
-	atomic_t qgroup_op_seq;
 
 	/*
 	 * used to avoid frequently calling ulist_alloc()/ulist_free()
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 8740152cce1f..c3b89584dad6 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2174,7 +2174,6 @@  static void btrfs_init_qgroup(struct btrfs_fs_info *fs_info)
 	spin_lock_init(&fs_info->qgroup_lock);
 	mutex_init(&fs_info->qgroup_ioctl_lock);
 	fs_info->qgroup_tree = RB_ROOT;
-	fs_info->qgroup_op_tree = RB_ROOT;
 	INIT_LIST_HEAD(&fs_info->dirty_qgroups);
 	fs_info->qgroup_seq = 1;
 	fs_info->qgroup_ulist = NULL;
@@ -2679,7 +2678,6 @@  int open_ctree(struct super_block *sb,
 	spin_lock_init(&fs_info->defrag_inodes_lock);
 	spin_lock_init(&fs_info->tree_mod_seq_lock);
 	spin_lock_init(&fs_info->super_lock);
-	spin_lock_init(&fs_info->qgroup_op_lock);
 	spin_lock_init(&fs_info->buffer_lock);
 	spin_lock_init(&fs_info->unused_bgs_lock);
 	rwlock_init(&fs_info->tree_mod_log_lock);
@@ -2706,7 +2704,6 @@  int open_ctree(struct super_block *sb,
 
 	atomic_set(&fs_info->async_delalloc_pages, 0);
 	atomic_set(&fs_info->defrag_running, 0);
-	atomic_set(&fs_info->qgroup_op_seq, 0);
 	atomic_set(&fs_info->reada_works_cnt, 0);
 	atomic_set(&fs_info->nr_delayed_iputs, 0);
 	atomic64_set(&fs_info->tree_mod_seq, 0);