From: David Sterba <dsterba@suse.cz>
To: fdmanana@kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] btrfs: make btrfs_destroy_delayed_refs() return void
Date: Mon, 5 Jun 2023 19:24:41 +0200 [thread overview]
Message-ID: <20230605172440.GD25292@twin.jikos.cz> (raw)
In-Reply-To: <44301b9e5e365a7b0f5bc57b72811aa4467427c2.1685704678.git.fdmanana@suse.com>
On Fri, Jun 02, 2023 at 12:19:42PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> btrfs_destroy_delayed_refs() always returns 0 and its single caller does
> not check its return value, as it also returns void, and so does the
> callers' caller and so on. This is because we are in the transaction abort
> path, where we have no way to deal with errors (we are in a critical
> situation) and all cleanup of resources works in a best effort fashion.
> So make btrfs_destroy_delayed_refs() return void.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
> ---
>
> V2: Make it explicit in the changelog that we are in the transaction
> abort path and therefore have no way to deal with errors.
>
> V1 was part of a patchset that was merged except for this patch:
> https://lore.kernel.org/linux-btrfs/cover.1685363099.git.fdmanana@suse.com/
Added to misc-next, my previous objections were meant for clarity and
the core of the error handling and return value passing lies in
unpin_extent_range(), not so significant for transaction cleanup.
prev parent reply other threads:[~2023-06-05 17:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 11:19 [PATCH v2] btrfs: make btrfs_destroy_delayed_refs() return void fdmanana
2023-06-02 11:27 ` Qu Wenruo
2023-06-05 17:24 ` 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=20230605172440.GD25292@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=fdmanana@kernel.org \
--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