All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>,
	linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>, Naohiro Aota <naohiro.aota@wdc.com>
Subject: Re: [PATCH] btrfs: zoned: propagate do_zone_finish() error in btrfs_zone_finish_endio()
Date: Wed, 19 Aug 2026 08:11:44 +0930	[thread overview]
Message-ID: <c96becbd-1f39-486c-8474-7a854af73044@gmx.com> (raw)
In-Reply-To: <20260818100037.1366563-1-johannes.thumshirn@wdc.com>



在 2026/8/18 19:30, Johannes Thumshirn 写道:
> btrfs_zone_finish_endio() ignored the return value of do_zone_finish()
> and always returned 0, silently dropping a failed zone finish.
> 
> Instead propagate any error from do_zone_finish() as the caller
> btrfs_finish_ordered_io() already handles it.
> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

> ---
>   fs/btrfs/zoned.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
> index a016cb471beb..82c2394dd43c 100644
> --- a/fs/btrfs/zoned.c
> +++ b/fs/btrfs/zoned.c
> @@ -2713,6 +2713,7 @@ int btrfs_zone_finish_endio(struct btrfs_fs_info *fs_info, u64 logical, u64 leng
>   {
>   	struct btrfs_block_group *block_group;
>   	u64 min_alloc_bytes;
> +	int ret = 0;
>   
>   	if (!btrfs_is_zoned(fs_info))
>   		return 0;
> @@ -2732,11 +2733,11 @@ int btrfs_zone_finish_endio(struct btrfs_fs_info *fs_info, u64 logical, u64 leng
>   	    block_group->start + block_group->zone_capacity)
>   		goto out;
>   
> -	do_zone_finish(block_group, true);
> +	ret = do_zone_finish(block_group, true);
>   
>   out:
>   	btrfs_put_block_group(block_group);
> -	return 0;
> +	return ret;
>   }
>   
>   static void btrfs_zone_finish_endio_workfn(struct work_struct *work)


  reply	other threads:[~2026-08-18 22:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 10:00 [PATCH] btrfs: zoned: propagate do_zone_finish() error in btrfs_zone_finish_endio() Johannes Thumshirn
2026-08-18 22:41 ` Qu Wenruo [this message]
2026-08-18 22:44   ` Qu Wenruo
2026-08-19  8:34     ` 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=c96becbd-1f39-486c-8474-7a854af73044@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.