From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: luca.stefani.ge1@gmail.com, David Sterba <dsterba@suse.com>,
Chris Mason <mason@kernel.org>
Cc: Robbie Ko <robbieko@synology.com>,
Filipe Manana <fdmanana@suse.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Zhiwei Liang <zhiwei.liang@zliang.me>, Qu Wenruo <wqu@suse.com>
Subject: Re: [PATCH 2/2] btrfs: don't report failure when trim is interrupted
Date: Thu, 29 Oct 2026 07:36:54 +1030 [thread overview]
Message-ID: <b00f8fc5-89f1-4483-8986-947392837a6b@gmx.com> (raw)
In-Reply-To: <20261028-b4-btrfs-fitrim-interruption-v1-2-bf5c53738b3a@gmail.com>
在 2026/10/29 04:25, Luca Stefani via B4 Relay 写道:
> From: Luca Stefani <luca.stefani.ge1@gmail.com>
>
> Treat cancellation as a successful partial trim as ext4 and XFS do.
>
> Reported-by: Zhiwei Liang <zhiwei.liang@zliang.me>
> Closes: https://lore.kernel.org/20261028-btrfs-fitrim-freezer-v1-1-0ad1d58aa94d@zliang.me/
In fact you should use Link tag here, for the original patch as a
report. Not Closes tag.
Otherwise looks good to me.
I can change the tags at merge time, so you don't need to resend the
series, unless there are other reviews that requires code changes.
Thanks,
Qu
> Suggested-by: Qu Wenruo <wqu@suse.com>
> Signed-off-by: Luca Stefani <luca.stefani.ge1@gmail.com>
> ---
> fs/btrfs/extent-tree.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index 242db255cf1c..90e581c29609 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -6926,7 +6926,7 @@ int btrfs_trim_fs(struct btrfs_fs_info *fs_info, struct fstrim_range *range)
> bg_failed, ERR_PTR(bg_ret));
>
> if (ret == -ERESTARTSYS || ret == -EINTR)
> - return ret;
> + goto out;
>
> ret = btrfs_trim_free_extents(fs_info, &group_trimmed, &dev_failed, &dev_ret);
> trimmed += group_trimmed;
> @@ -6935,9 +6935,8 @@ int btrfs_trim_fs(struct btrfs_fs_info *fs_info, struct fstrim_range *range)
> btrfs_warn(fs_info,
> "failed to trim %llu device(s), first error %pe",
> dev_failed, ERR_PTR(dev_ret));
> +out:
> range->len = trimmed;
> - if (ret == -ERESTARTSYS || ret == -EINTR)
> - return ret;
> if (bg_ret)
> return bg_ret;
> return dev_ret;
>
next prev parent reply other threads:[~2026-10-28 21:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 17:55 [PATCH 0/2] btrfs: don't expose ERESTARTSYS to userspace Luca Stefani via B4 Relay
2026-10-28 17:55 ` [PATCH 1/2] btrfs: account partially completed discards Luca Stefani via B4 Relay
2026-10-28 21:02 ` Qu Wenruo
2026-10-28 17:55 ` [PATCH 2/2] btrfs: don't report failure when trim is interrupted Luca Stefani via B4 Relay
2026-10-28 21:06 ` Qu Wenruo [this message]
2026-10-28 20:13 ` [PATCH 0/2] btrfs: don't expose ERESTARTSYS to userspace zhiwei.liang
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=b00f8fc5-89f1-4483-8986-947392837a6b@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.com \
--cc=fdmanana@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.stefani.ge1@gmail.com \
--cc=mason@kernel.org \
--cc=robbieko@synology.com \
--cc=wqu@suse.com \
--cc=zhiwei.liang@zliang.me \
/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
all inboxes | Powered by JetHome®