From: Christoph Hellwig <hch@infradead.org>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v5 04/13] btrfs: add support for inserting raid stripe extents
Date: Sun, 12 Feb 2023 22:57:13 -0800 [thread overview]
Message-ID: <Y+nfSQ6fxhDooglb@infradead.org> (raw)
In-Reply-To: <96f86c817184925f3d1e625d735058373d90e757.1675853489.git.johannes.thumshirn@wdc.com>
> --- a/fs/btrfs/bio.h
> +++ b/fs/btrfs/bio.h
> @@ -58,6 +58,8 @@ struct btrfs_bio {
> atomic_t pending_ios;
> struct work_struct end_io_work;
>
> + struct work_struct raid_stripe_work;
You should be able to reused end_io_work here, as it is only used
for reads currently.
>
> +static bool delayed_ref_needs_rst_update(struct btrfs_fs_info *fs_info,
> + struct btrfs_delayed_ref_head *head)
> +{
> + struct extent_map *em;
> + struct map_lookup *map;
> + bool ret = false;
> +
> + if (!btrfs_stripe_tree_root(fs_info))
> + return ret;
> +
> + em = btrfs_get_chunk_map(fs_info, head->bytenr, head->num_bytes);
> + if (!em)
> + return ret;
> +
> + map = em->map_lookup;
> +
> + if (btrfs_need_stripe_tree_update(fs_info, map->type))
This just seems very expensive. Is there no way to propafate
this information without doign a chunk map lookup every time?
> --- a/fs/btrfs/zoned.c
> +++ b/fs/btrfs/zoned.c
> @@ -1687,6 +1687,10 @@ void btrfs_rewrite_logical_zoned(struct btrfs_ordered_extent *ordered)
> u64 *logical = NULL;
> int nr, stripe_len;
>
> + /* Filesystems with a stripe tree have their own l2p mapping */
> + if (btrfs_stripe_tree_root(fs_info))
> + return;
I don't think we should even be able to readch this, as the call to
btrfs_rewrite_logical_zoned is guarded by having a valid
ordered->physical… and that is only set in btrfs_simple_end_io.
So this could just be an assert.
next prev parent reply other threads:[~2023-02-13 6:57 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 10:57 [PATCH v5 00/13] btrfs: introduce RAID stripe tree Johannes Thumshirn
2023-02-08 10:57 ` [PATCH v5 01/13] btrfs: re-add trans parameter to insert_delayed_ref Johannes Thumshirn
2023-02-08 19:41 ` Josef Bacik
2023-02-08 10:57 ` [PATCH v5 02/13] btrfs: add raid stripe tree definitions Johannes Thumshirn
2023-02-08 19:42 ` Josef Bacik
2023-02-13 6:50 ` Christoph Hellwig
2023-02-13 11:10 ` Johannes Thumshirn
2023-02-13 11:34 ` Anand Jain
2023-02-08 10:57 ` [PATCH v5 03/13] btrfs: read raid-stripe-tree from disk Johannes Thumshirn
2023-02-08 19:43 ` Josef Bacik
2023-02-13 11:35 ` Anand Jain
2023-02-08 10:57 ` [PATCH v5 04/13] btrfs: add support for inserting raid stripe extents Johannes Thumshirn
2023-02-08 19:47 ` Josef Bacik
2023-02-08 19:52 ` Josef Bacik
2023-02-13 6:57 ` Christoph Hellwig [this message]
2023-02-13 10:43 ` Johannes Thumshirn
2023-02-13 13:12 ` Johannes Thumshirn
2023-02-13 7:40 ` Qu Wenruo
2023-02-13 10:49 ` Johannes Thumshirn
2023-02-13 11:12 ` Qu Wenruo
2023-02-13 11:37 ` Johannes Thumshirn
2023-02-08 10:57 ` [PATCH v5 05/13] btrfs: delete stripe extent on extent deletion Johannes Thumshirn
2023-02-08 20:00 ` Josef Bacik
2023-02-13 15:21 ` Johannes Thumshirn
2023-02-08 10:57 ` [PATCH v5 06/13] btrfs: lookup physical address from stripe extent Johannes Thumshirn
2023-02-08 20:16 ` Josef Bacik
2023-02-08 10:57 ` [PATCH v5 07/13] btrfs: add raid stripe tree pretty printer Johannes Thumshirn
2023-02-08 10:57 ` [PATCH v5 08/13] btrfs: zoned: allow zoned RAID Johannes Thumshirn
2023-02-08 20:18 ` Josef Bacik
2023-02-08 10:57 ` [PATCH v5 09/13] btrfs: check for leaks of ordered stripes on umount Johannes Thumshirn
2023-02-08 20:19 ` Josef Bacik
2023-02-08 10:57 ` [PATCH v5 10/13] btrfs: add tracepoints for ordered stripes Johannes Thumshirn
2023-02-08 10:57 ` [PATCH v5 11/13] btrfs: announce presence of raid-stripe-tree in sysfs Johannes Thumshirn
2023-02-08 20:20 ` Josef Bacik
2023-02-08 10:57 ` [PATCH v5 12/13] btrfs: consult raid-stripe-tree when scrubbing Johannes Thumshirn
2023-02-08 20:21 ` Josef Bacik
2023-02-08 10:57 ` [PATCH v5 13/13] btrfs: add raid-stripe-tree to features enabled with debug Johannes Thumshirn
2023-02-08 20:23 ` Josef Bacik
2023-02-09 0:42 ` [PATCH v5 00/13] btrfs: introduce RAID stripe tree Qu Wenruo
2023-02-09 8:47 ` Johannes Thumshirn
2023-02-09 15:57 ` Phillip Susi
2023-02-10 8:44 ` Johannes Thumshirn
2023-02-10 10:33 ` Johannes Thumshirn
2023-02-13 16:42 ` Phillip Susi
2023-02-13 17:44 ` Johannes Thumshirn
2023-02-13 17:56 ` Phillip Susi
2023-02-14 5:52 ` Christoph Hellwig
2023-02-14 5:51 ` Christoph Hellwig
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=Y+nfSQ6fxhDooglb@infradead.org \
--to=hch@infradead.org \
--cc=johannes.thumshirn@wdc.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