From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
To: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>
Cc: Qu Wenru <wqu@suse.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH 3/4] btrfs: rename ordered_enmtry in btrfs_io_context
Date: Mon, 18 Sep 2023 07:14:32 -0700 [thread overview]
Message-ID: <20230918-rst-updates-v1-3-17686dc06859@wdc.com> (raw)
In-Reply-To: <20230918-rst-updates-v1-0-17686dc06859@wdc.com>
Rename the 'ordered_entry' member of 'struct btrfs_io_context' to
'rst_ordered_entry' to make it clear, it is only there for updates to the
raid-stripe-tree.
Cc: Qu Wenru <wqu@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
fs/btrfs/bio.c | 3 ++-
fs/btrfs/raid-stripe-tree.c | 18 +++++++++---------
fs/btrfs/volumes.h | 2 +-
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
index 4c234024beae..d0a029c859e1 100644
--- a/fs/btrfs/bio.c
+++ b/fs/btrfs/bio.c
@@ -708,7 +708,8 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
* can't happen until after the last submission.
*/
btrfs_get_bioc(bioc);
- list_add_tail(&bioc->ordered_entry, &bbio->ordered->bioc_list);
+ list_add_tail(&bioc->rst_ordered_entry,
+ &bbio->ordered->bioc_list);
}
/*
diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c
index 0c0e620ed8b9..1bf84258dbfa 100644
--- a/fs/btrfs/raid-stripe-tree.c
+++ b/fs/btrfs/raid-stripe-tree.c
@@ -132,7 +132,7 @@ static int btrfs_insert_mirrored_raid_extents(struct btrfs_trans_handle *trans,
struct btrfs_io_context *bioc;
int ret;
- list_for_each_entry(bioc, &ordered->bioc_list, ordered_entry) {
+ list_for_each_entry(bioc, &ordered->bioc_list, rst_ordered_entry) {
ret = btrfs_insert_one_raid_extent(trans, num_stripes, bioc);
if (ret)
return ret;
@@ -167,12 +167,12 @@ static int btrfs_insert_striped_mirrored_raid_extents(
rbioc->map_type = map_type;
rbioc->logical = list_first_entry(&ordered->bioc_list, typeof(*rbioc),
- ordered_entry)->logical;
+ rst_ordered_entry)->logical;
stripe_end = rbioc->logical;
prev_end = stripe_end;
i = 0;
- list_for_each_entry(bioc, &ordered->bioc_list, ordered_entry) {
+ list_for_each_entry(bioc, &ordered->bioc_list, rst_ordered_entry) {
rbioc->size += bioc->size;
for (int j = 0; j < substripes; j++) {
int stripe = i + j;
@@ -201,7 +201,7 @@ static int btrfs_insert_striped_mirrored_raid_extents(
}
if (left) {
- bioc = list_prev_entry(bioc, ordered_entry);
+ bioc = list_prev_entry(bioc, rst_ordered_entry);
ret = btrfs_insert_one_raid_extent(trans, substripes, bioc);
}
@@ -225,10 +225,10 @@ static int btrfs_insert_striped_raid_extents(struct btrfs_trans_handle *trans,
return -ENOMEM;
rbioc->map_type = map_type;
rbioc->logical = list_first_entry(&ordered->bioc_list, typeof(*rbioc),
- ordered_entry)->logical;
+ rst_ordered_entry)->logical;
i = 0;
- list_for_each_entry(bioc, &ordered->bioc_list, ordered_entry) {
+ list_for_each_entry(bioc, &ordered->bioc_list, rst_ordered_entry) {
rbioc->size += bioc->size;
rbioc->stripes[i].dev = bioc->stripes[0].dev;
rbioc->stripes[i].physical = bioc->stripes[0].physical;
@@ -266,7 +266,7 @@ int btrfs_insert_raid_extent(struct btrfs_trans_handle *trans,
return 0;
map_type = list_first_entry(&ordered_extent->bioc_list, typeof(*bioc),
- ordered_entry)->map_type;
+ rst_ordered_entry)->map_type;
switch (map_type & BTRFS_BLOCK_GROUP_PROFILE_MASK) {
case BTRFS_BLOCK_GROUP_DUP:
@@ -291,8 +291,8 @@ int btrfs_insert_raid_extent(struct btrfs_trans_handle *trans,
while (!list_empty(&ordered_extent->bioc_list)) {
bioc = list_first_entry(&ordered_extent->bioc_list,
- typeof(*bioc), ordered_entry);
- list_del(&bioc->ordered_entry);
+ typeof(*bioc), rst_ordered_entry);
+ list_del(&bioc->rst_ordered_entry);
btrfs_put_bioc(bioc);
}
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 54549e34a306..b511d17c6717 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -432,7 +432,7 @@ struct btrfs_io_context {
u64 logical;
u64 size;
- struct list_head ordered_entry;
+ struct list_head rst_ordered_entry;
/*
* The total number of stripes, including the extra duplicated
--
2.41.0
next prev parent reply other threads:[~2023-09-18 15:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 14:14 [PATCH 0/4] btrfs: RAID stripe tree updates Johannes Thumshirn
2023-09-18 14:14 ` [PATCH 1/4] btrfs: fix 64bit division in btrfs_insert_striped_mirrored_raid_extents Johannes Thumshirn
2023-09-18 14:18 ` Geert Uytterhoeven
2023-09-18 15:03 ` Johannes Thumshirn
2023-09-18 16:24 ` David Sterba
2023-09-18 18:31 ` Geert Uytterhoeven
2023-09-18 21:07 ` David Sterba
2023-09-19 0:37 ` Qu Wenruo
2023-09-19 13:58 ` David Sterba
2023-09-19 21:50 ` Qu Wenruo
2023-09-20 15:34 ` David Sterba
2023-09-18 14:14 ` [PATCH 2/4] btrfs: break loop in case set_io_stripe fails Johannes Thumshirn
2023-09-18 14:14 ` Johannes Thumshirn [this message]
2023-09-18 14:14 ` [PATCH 4/4] btrfs: add tree-checker for RAID-stripe-tree Johannes Thumshirn
2023-09-19 0:30 ` Qu Wenruo
2023-09-18 16:39 ` [PATCH 0/4] btrfs: RAID stripe tree updates 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=20230918-rst-updates-v1-3-17686dc06859@wdc.com \
--to=johannes.thumshirn@wdc.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wqu@suse.com \
/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).