From: Josef Bacik <josef@toxicpanda.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 2/3] btrfs-progs: properly cleanup aborted transactions in check
Date: Wed, 6 Sep 2023 09:34:19 -0400 [thread overview]
Message-ID: <20230906133419.GA1877831@perftesting> (raw)
In-Reply-To: <36a8f250-5545-45ce-8185-5451fbb0ebf4@gmx.com>
On Wed, Sep 06, 2023 at 06:55:45AM +0800, Qu Wenruo wrote:
>
>
> On 2023/9/6 04:21, Josef Bacik wrote:
> > There are several places that we call btrfs_abort_transaction() in a
> > failure case, but never call btrfs_commit_transaction(). This leaks the
> > trans handle and the associated extent buffers and such. Fix all these
> > sites by making sure we call btrfs_commit_transaction() after we call
> > btrfs_abort_transaction() to make sure all the appropriate cleanup is
> > done. This gets rid of the leaked extent buffer errors.
> >
> > Signed-off-by: Josef Bacik <josef@toxicpanda.com>
>
> Reviewed-by: Qu Wenruo <wqu@suse.com>
>
> Although I'd say wouldn't it be better to make btrfs_abort_transaction()
> more standalone?
>
> It's pretty instinctive to think btrfs_abort_transaction() should handle
> everything.
>
It doesn't handle everything in the kernel, we call abort but we still have to
call btrfs_end_transaction() to clean up the trans handle. Thanks,
Josef
next prev parent reply other threads:[~2023-09-06 13:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 20:21 [PATCH 0/3] btrfs-progs: add eb leak detection and fixes Josef Bacik
2023-09-05 20:21 ` [PATCH 1/3] btrfs-progs: cleanup dirty buffers on transaction abort Josef Bacik
2023-09-05 22:53 ` Qu Wenruo
2023-09-05 20:21 ` [PATCH 2/3] btrfs-progs: properly cleanup aborted transactions in check Josef Bacik
2023-09-05 22:55 ` Qu Wenruo
2023-09-06 13:34 ` Josef Bacik [this message]
2023-09-05 20:21 ` [PATCH 3/3] btrfs-progs: add extent buffer leak detection to make test Josef Bacik
2023-09-05 20:49 ` David Sterba
2023-09-06 13:52 ` Josef Bacik
2023-09-05 22:57 ` Qu Wenruo
2023-09-07 13:32 ` David Sterba
2023-09-08 12:08 ` [PATCH 0/3] btrfs-progs: add eb leak detection and fixes David Sterba
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=20230906133419.GA1877831@perftesting \
--to=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.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