From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 2/4] btrfs: Drop fs_info parameter from btrfs_qgroup_account_extents
Date: Thu, 15 Mar 2018 16:00:25 +0200 [thread overview]
Message-ID: <1521122427-25062-2-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1521122427-25062-1-git-send-email-nborisov@suse.com>
It's provided by the transaction handle.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
fs/btrfs/qgroup.c | 6 +++---
fs/btrfs/qgroup.h | 3 +--
fs/btrfs/transaction.c | 4 ++--
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 0fa4f07b80b8..2e1da7a44478 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -2014,9 +2014,9 @@ btrfs_qgroup_account_extent(struct btrfs_trans_handle *trans,
return ret;
}
-int btrfs_qgroup_account_extents(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info)
+int btrfs_qgroup_account_extents(struct btrfs_trans_handle *trans)
{
+ struct btrfs_fs_info *fs_info = trans->fs_info;
struct btrfs_qgroup_extent_record *record;
struct btrfs_delayed_ref_root *delayed_refs;
struct ulist *new_roots = NULL;
@@ -2945,7 +2945,7 @@ static int __btrfs_qgroup_release_data(struct inode *inode,
if (free && reserved)
return qgroup_free_reserved_data(inode, reserved, start, len);
extent_changeset_init(&changeset);
- ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, start,
+ ret = clear_record_extent_bits(&BTRFS_I(inode)->io_tree, start,
start + len -1, EXTENT_QGROUP_RESERVED, &changeset);
if (ret < 0)
goto out;
diff --git a/fs/btrfs/qgroup.h b/fs/btrfs/qgroup.h
index d9984e87cddf..ad003483d20c 100644
--- a/fs/btrfs/qgroup.h
+++ b/fs/btrfs/qgroup.h
@@ -220,8 +220,7 @@ btrfs_qgroup_account_extent(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
u64 bytenr, u64 num_bytes,
struct ulist *old_roots, struct ulist *new_roots);
-int btrfs_qgroup_account_extents(struct btrfs_trans_handle *trans,
- struct btrfs_fs_info *fs_info);
+int btrfs_qgroup_account_extents(struct btrfs_trans_handle *trans);
int btrfs_run_qgroups(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info);
int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans,
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 9913aa9f3a25..0a582a1adaf3 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1369,7 +1369,7 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans,
ret = commit_fs_roots(trans);
if (ret)
goto out;
- ret = btrfs_qgroup_account_extents(trans, fs_info);
+ ret = btrfs_qgroup_account_extents(trans);
if (ret < 0)
goto out;
@@ -2189,7 +2189,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
* Since fs roots are all committed, we can get a quite accurate
* new_roots. So let's do quota accounting.
*/
- ret = btrfs_qgroup_account_extents(trans, fs_info);
+ ret = btrfs_qgroup_account_extents(trans);
if (ret < 0) {
mutex_unlock(&fs_info->tree_log_mutex);
mutex_unlock(&fs_info->reloc_mutex);
--
2.7.4
next prev parent reply other threads:[~2018-03-15 14:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 14:00 [PATCH 1/4] btrfs: drop fs_info parameter from btrfs_run_delayed_refs Nikolay Borisov
2018-03-15 14:00 ` Nikolay Borisov [this message]
2018-03-15 14:00 ` [PATCH 3/4] btrfs: Drop fs_info parameter from btrfs_finish_extent_commit Nikolay Borisov
2018-03-15 14:00 ` [PATCH 4/4] btrfs: Drop fs_info parameter from __btrfs_run_delayed_refs Nikolay Borisov
2018-03-15 15:27 ` [PATCH v2] btrfs: drop fs_info parameter from btrfs_run_delayed_refs Nikolay Borisov
2018-03-16 15:55 ` [PATCH 1/4] " 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=1521122427-25062-2-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).