Commit e69bcee3 authored by Qu Wenruo's avatar Qu Wenruo Committed by Chris Mason
Browse files

btrfs: qgroup: Cleanup the old ref_node-oriented mechanism.



Goodbye, the old mechanisim.

Signed-off-by: default avatarQu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 442244c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1736,7 +1736,7 @@ struct btrfs_fs_info {
	/* list of dirty qgroups to be written at next commit */
	struct list_head dirty_qgroups;

	/* used by btrfs_qgroup_record_ref for an efficient tree traversal */
	/* used by qgroup for an efficient tree traversal */
	u64 qgroup_seq;

	/* qgroup rescan items */
+0 −5
Original line number Diff line number Diff line
@@ -1981,7 +1981,6 @@ static int __btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
	u64 refs;
	int ret;
	int no_quota = node->no_quota;
	enum btrfs_qgroup_operation_type type = BTRFS_QGROUP_OPER_ADD_EXCL;

	path = btrfs_alloc_path();
	if (!path)
@@ -2009,8 +2008,6 @@ static int __btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
	btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
	item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item);
	refs = btrfs_extent_refs(leaf, item);
	if (refs)
		type = BTRFS_QGROUP_OPER_ADD_SHARED;
	btrfs_set_extent_refs(leaf, item, refs + refs_to_add);
	if (extent_op)
		__run_delayed_extent_op(extent_op, leaf, item);
@@ -6112,7 +6109,6 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
	u64 bytenr = node->bytenr;
	u64 num_bytes = node->num_bytes;
	int last_ref = 0;
	enum btrfs_qgroup_operation_type type = BTRFS_QGROUP_OPER_SUB_EXCL;
	bool skinny_metadata = btrfs_fs_incompat(root->fs_info,
						 SKINNY_METADATA);

@@ -6293,7 +6289,6 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
	refs -= refs_to_drop;

	if (refs > 0) {
		type = BTRFS_QGROUP_OPER_SUB_SHARED;
		if (extent_op)
			__run_delayed_extent_op(extent_op, leaf, ei);
		/*