public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Mark Harmstone <mark@harmstone.com>
Cc: linux-btrfs@vger.kernel.org, Mark Harmstone <maharmstone@fb.com>
Subject: Re: [PATCH] btrfs: don't clobber errors in add_remap_tree_entries()
Date: Mon, 13 Apr 2026 20:48:29 +0200	[thread overview]
Message-ID: <20260413184829.GF12792@twin.jikos.cz> (raw)
In-Reply-To: <20260408131324.92442-1-mark@harmstone.com>

On Wed, Apr 08, 2026 at 02:13:20PM +0100, Mark Harmstone wrote:
> From: Mark Harmstone <maharmstone@fb.com>
> 
> In add_remap_tree_entries(), we only process a certain number of entries
> at a time, meaning we may need to loop.
> 
> But because we weren't checking the return value of btrfs_insert_empty_items()
> within the loop, this meant that if the last iteration of the loop
> succeeded but a previous iteration failed, we were erroneously returning
> 0.
> 
> Fix this by breaking the loop early if btrfs_insert_empty_items() fails.
> 
> Fixes: b56f35560b82 ("btrfs: handle setting up relocation of block group with remap-tree")
> Signed-off-by: Mark Harmstone <mark@harmstone.com>

Reviewed-by: David Sterba <dsterba@suse.com>

      reply	other threads:[~2026-04-13 18:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08 13:13 [PATCH] btrfs: don't clobber errors in add_remap_tree_entries() Mark Harmstone
2026-04-13 18:48 ` David Sterba [this message]

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=20260413184829.GF12792@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=maharmstone@fb.com \
    --cc=mark@harmstone.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