From: Johannes Thumshirn <jth@kernel.org>
To: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH v2 5/6] btrfs: pass a struct reloc_control to prealloc_file_extent_cluster
Date: Thu, 06 Jun 2024 10:35:03 +0200 [thread overview]
Message-ID: <20240606-reloc-cleanups-v2-5-5172a6926f62@kernel.org> (raw)
In-Reply-To: <20240606-reloc-cleanups-v2-0-5172a6926f62@kernel.org>
From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Pass a 'struct reloc_control' to prealloc_file_extent_cluster()
instead of passing its members 'data_inode' and 'cluster' on their own.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
fs/btrfs/relocation.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index df3f7c11cfce..c138d08cce76 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2790,10 +2790,10 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans,
return ret;
}
-static noinline_for_stack int prealloc_file_extent_cluster(
- struct btrfs_inode *inode,
- const struct file_extent_cluster *cluster)
+static noinline_for_stack int prealloc_file_extent_cluster(struct reloc_control *rc)
{
+ const struct file_extent_cluster *cluster = &rc->cluster;
+ struct btrfs_inode *inode = BTRFS_I(rc->data_inode);
u64 alloc_hint = 0;
u64 start;
u64 end;
@@ -3104,7 +3104,7 @@ static int relocate_file_extent_cluster(struct reloc_control *rc)
if (!ra)
return -ENOMEM;
- ret = prealloc_file_extent_cluster(BTRFS_I(inode), cluster);
+ ret = prealloc_file_extent_cluster(rc);
if (ret)
goto out;
--
2.43.0
next prev parent reply other threads:[~2024-06-06 8:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 8:34 [PATCH v2 0/6] btrfs: small cleanups for relocation code Johannes Thumshirn
2024-06-06 8:34 ` [PATCH v2 1/6] btrfs: pass reloc_control to relocate_data_extent Johannes Thumshirn
2024-06-06 8:35 ` [PATCH v2 2/6] btrfs: pass a reloc_control to relocate_file_extent_cluster Johannes Thumshirn
2024-06-06 8:35 ` [PATCH v2 3/6] btrfs: pass a reloc_control to relocate_one_folio Johannes Thumshirn
2024-06-06 8:35 ` [PATCH v2 4/6] btrfs: don't pass fs_info to describe_relocation Johannes Thumshirn
2024-06-06 8:35 ` Johannes Thumshirn [this message]
2024-06-06 16:54 ` [PATCH v2 5/6] btrfs: pass a struct reloc_control to prealloc_file_extent_cluster Josef Bacik
2024-06-06 8:35 ` [PATCH v2 6/6] btrfs: pass reloc_control to setup_relocation_extent_mapping Johannes Thumshirn
2024-06-06 16:55 ` Josef Bacik
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=20240606-reloc-cleanups-v2-5-5172a6926f62@kernel.org \
--to=jth@kernel.org \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=johannes.thumshirn@wdc.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@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