public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Johannes Thumshirn <jth@kernel.org>
Cc: Chris Mason <clm@fb.com>, David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: Re: [PATCH 2/3] btrfs: replace stripe extents
Date: Mon, 10 Jun 2024 15:43:52 -0400	[thread overview]
Message-ID: <20240610194352.GB235772@perftesting> (raw)
In-Reply-To: <20240610-b4-rst-updates-v1-2-179c1eec08f2@kernel.org>

On Mon, Jun 10, 2024 at 10:40:26AM +0200, Johannes Thumshirn wrote:
> From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> 
> If we can't insert a stripe extent in the RAID stripe tree, because
> the key that points to the specific position in the stripe tree is
> already existing, we have to remove the item and then replace it by a
> new item.
> 
> This can happen for example on device replace operations.
> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
>  fs/btrfs/ctree.c            |  1 +
>  fs/btrfs/raid-stripe-tree.c | 34 ++++++++++++++++++++++++++++++++++
>  2 files changed, 35 insertions(+)
> 
> diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
> index 1a49b9232990..ad934c5469c4 100644
> --- a/fs/btrfs/ctree.c
> +++ b/fs/btrfs/ctree.c
> @@ -3844,6 +3844,7 @@ static noinline int setup_leaf_for_split(struct btrfs_trans_handle *trans,
>  	btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
>  
>  	BUG_ON(key.type != BTRFS_EXTENT_DATA_KEY &&
> +	       key.type != BTRFS_RAID_STRIPE_KEY &&

This seems unrelated.  Thanks,

Josef

  reply	other threads:[~2024-06-10 19:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10  8:40 [PATCH 0/3] btrfs: rst: updates for RAID stripe tree Johannes Thumshirn
2024-06-10  8:40 ` [PATCH 1/3] btrfs: rst: remove encoding field from stripe_extent Johannes Thumshirn
2024-06-11 14:36   ` David Sterba
2024-06-11 16:33     ` Johannes Thumshirn
2024-06-13 21:23       ` David Sterba
2024-06-14  9:36         ` Johannes Thumshirn
2024-06-16 18:19           ` David Sterba
2024-06-17  6:27   ` Qu Wenruo
2024-06-10  8:40 ` [PATCH 2/3] btrfs: replace stripe extents Johannes Thumshirn
2024-06-10 19:43   ` Josef Bacik [this message]
2024-06-11  6:27     ` Johannes Thumshirn
2024-06-10  8:40 ` [PATCH 3/3] btrfs: split RAID stripes on deletion Johannes Thumshirn
2024-06-10 19:45   ` Josef Bacik
2024-06-11  6:39     ` Johannes Thumshirn

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=20240610194352.GB235772@perftesting \
    --to=josef@toxicpanda.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=jth@kernel.org \
    --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