From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 05/11] btrfs-progs: check: Make update_pinned_extents take btrfs_fs_info
Date: Mon, 28 May 2018 09:36:44 +0300 [thread overview]
Message-ID: <1527489410-3564-6-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1527489410-3564-1-git-send-email-nborisov@suse.com>
This function needs btrfs_fs_info and not a root. So make it directly
take btrfs_fs_info,
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
extent-tree.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/extent-tree.c b/extent-tree.c
index 89fed5b73b1f..8e7f888b5ce5 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -1979,12 +1979,11 @@ static int update_block_group(struct btrfs_root *root,
return 0;
}
-static int update_pinned_extents(struct btrfs_root *root,
+static int update_pinned_extents(struct btrfs_fs_info *fs_info,
u64 bytenr, u64 num, int pin)
{
u64 len;
struct btrfs_block_group_cache *cache;
- struct btrfs_fs_info *fs_info = root->fs_info;
if (pin) {
set_extent_dirty(&fs_info->pinned_extents,
@@ -2033,7 +2032,8 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans,
EXTENT_DIRTY);
if (ret)
break;
- update_pinned_extents(root, start, end + 1 - start, 0);
+ update_pinned_extents(trans->fs_info, start, end + 1 - start,
+ 0);
clear_extent_dirty(unpin, start, end);
set_extent_dirty(free_space_cache, start, end);
}
@@ -2136,7 +2136,7 @@ static int pin_down_bytes(struct btrfs_trans_handle *trans,
}
free_extent_buffer(buf);
pinit:
- update_pinned_extents(root, bytenr, num_bytes, 1);
+ update_pinned_extents(trans->fs_info, bytenr, num_bytes, 1);
BUG_ON(err < 0);
return 0;
@@ -2145,13 +2145,13 @@ static int pin_down_bytes(struct btrfs_trans_handle *trans,
void btrfs_pin_extent(struct btrfs_fs_info *fs_info,
u64 bytenr, u64 num_bytes)
{
- update_pinned_extents(fs_info->extent_root, bytenr, num_bytes, 1);
+ update_pinned_extents(fs_info, bytenr, num_bytes, 1);
}
void btrfs_unpin_extent(struct btrfs_fs_info *fs_info,
u64 bytenr, u64 num_bytes)
{
- update_pinned_extents(fs_info->extent_root, bytenr, num_bytes, 0);
+ update_pinned_extents(fs_info, bytenr, num_bytes, 0);
}
/*
--
2.7.4
next prev parent reply other threads:[~2018-05-28 16:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-28 6:36 [PATCH 00/11] Summer argument cleanup Nikolay Borisov
2018-05-28 6:36 ` [PATCH 01/11] btrfs-progs: check: Remove root argument from delete_extent_records Nikolay Borisov
2018-05-28 6:36 ` [PATCH 02/11] btrfs-progs: check: Remove root parameter from btrfs_fix_block_accounting Nikolay Borisov
2018-05-28 6:36 ` [PATCH 03/11] btrfs-progs: check: Remove root parameter from del_pending_extents Nikolay Borisov
2018-05-28 6:36 ` [PATCH 04/11] btrfs-progs: check: Remove root argument from finish_current_insert Nikolay Borisov
2018-05-28 6:36 ` Nikolay Borisov [this message]
2018-05-28 6:36 ` [PATCH 06/11] btrfs-progs: Remove unused argument from clean_tree_block Nikolay Borisov
2018-05-28 6:36 ` [PATCH 07/11] btrfs-progs: check: Remove unused root argument from btrfs_extent_post_op Nikolay Borisov
2018-05-28 6:36 ` [PATCH 08/11] btrfs-progs: Change btrfs_root to btrfs_fs_info argument in btrfs_lookup_extent_info Nikolay Borisov
2018-05-28 6:36 ` [PATCH 09/11] btrfs-progs: Remove root argument from btrfs_set_block_flags Nikolay Borisov
2018-05-28 6:36 ` [PATCH 10/11] btrfs-progs: Remove root argument from write_one_cache_group Nikolay Borisov
2018-05-28 6:36 ` [PATCH 11/11] btrfs-progs: Remove fs_info argument from write_ctree_super Nikolay Borisov
2018-05-29 1:06 ` [PATCH 00/11] Summer argument cleanup Lu Fengqi
2018-05-31 11:34 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1527489410-3564-6-git-send-email-nborisov@suse.com \
--to=nborisov@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).