From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: fdmanana@kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/7] btrfs: avoid some unnecessary commit of empty transactions
Date: Thu, 23 May 2024 07:51:34 +0930 [thread overview]
Message-ID: <0452200a-1285-4f34-bd15-3ffb6b49c688@gmx.com> (raw)
In-Reply-To: <cover.1716386100.git.fdmanana@suse.com>
在 2024/5/23 00:06, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
>
> A few places can unnecessarily create an empty transaction and then commit
> it, when the goal is just to catch the current transaction and wait for
> its commit to complete. This results in wasting IO, time and rotation of
> the precious backup roots in the super block. Details in the change logs.
> The patches are all independent, except patch 4 that applies on top of
> patch 3 (but could have been done in any order really, they are independent).
Looks good to me.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Have you considered outputting a warning if we're committing an empty
transaction (for debug build)?
That would prevent such problem from happening again.
Thanks,
Qu
>
> Filipe Manana (7):
> btrfs: qgroup: avoid start/commit empty transaction when flushing reservations
> btrfs: avoid create and commit empty transaction when committing super
> btrfs: send: make ensure_commit_roots_uptodate() simpler and more efficient
> btrfs: send: avoid create/commit empty transaction at ensure_commit_roots_uptodate()
> btrfs: scrub: avoid create/commit empty transaction at finish_extent_writes_for_zoned()
> btrfs: add and use helper to commit the current transaction
> btrfs: send: get rid of the label and gotos at ensure_commit_roots_uptodate()
>
> fs/btrfs/disk-io.c | 8 +-------
> fs/btrfs/qgroup.c | 31 +++++--------------------------
> fs/btrfs/scrub.c | 6 +-----
> fs/btrfs/send.c | 32 ++++++++------------------------
> fs/btrfs/space-info.c | 9 +--------
> fs/btrfs/super.c | 11 +----------
> fs/btrfs/transaction.c | 19 +++++++++++++++++++
> fs/btrfs/transaction.h | 1 +
> 8 files changed, 37 insertions(+), 80 deletions(-)
>
next prev parent reply other threads:[~2024-05-22 22:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 14:36 [PATCH 0/7] btrfs: avoid some unnecessary commit of empty transactions fdmanana
2024-05-22 14:36 ` [PATCH 1/7] btrfs: qgroup: avoid start/commit empty transaction when flushing reservations fdmanana
2024-05-22 14:36 ` [PATCH 2/7] btrfs: avoid create and commit empty transaction when committing super fdmanana
2024-05-22 14:36 ` [PATCH 3/7] btrfs: send: make ensure_commit_roots_uptodate() simpler and more efficient fdmanana
2024-05-22 14:36 ` [PATCH 4/7] btrfs: send: avoid create/commit empty transaction at ensure_commit_roots_uptodate() fdmanana
2024-05-22 14:36 ` [PATCH 5/7] btrfs: scrub: avoid create/commit empty transaction at finish_extent_writes_for_zoned() fdmanana
2024-05-22 14:36 ` [PATCH 6/7] btrfs: add and use helper to commit the current transaction fdmanana
2024-05-22 14:36 ` [PATCH 7/7] btrfs: send: get rid of the label and gotos at ensure_commit_roots_uptodate() fdmanana
2024-05-22 15:21 ` [PATCH 0/7] btrfs: avoid some unnecessary commit of empty transactions Josef Bacik
2024-05-22 22:21 ` Qu Wenruo [this message]
2024-05-23 14:02 ` Filipe Manana
2024-05-23 17:03 ` 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=0452200a-1285-4f34-bd15-3ffb6b49c688@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--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