From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs-progs: speed up "btrfs subvolume sync"
Date: Sun, 1 Nov 2026 20:06:50 +1030 [thread overview]
Message-ID: <cover.1793525519.git.wqu@suse.com> (raw)
Unlike the name, "btrfs subvolume sync" doesn't sync the fs, but only
wait for unlinked subvolumes to be fully deleted.
But that wait completely depends on when the cleaner is woken up, and by
default it takes 30s.
That's why a lot of fstests cases are remount with "commit=1" mount
option to speed "btrfs subvolume sync" up.
To speed things up, and reduce the confusion on the command name, do a
proper BTRFS_IOC_SYNC before waiting for unlinked subvolumes.
That's done in the 2nd patch.
The first patch is minor fix to an uninitilized access, exposed by LLM
during the review of the 2nd patch.
Qu Wenruo (2):
btrfs-progs: subvolume: fix an uninitialized access
btrfs-progs: trigger a sync before waiting for subvolumes to be
dropped
Documentation/btrfs-subvolume.rst | 7 +++++++
cmds/subvolume.c | 6 +++++-
2 files changed, 12 insertions(+), 1 deletion(-)
--
2.56.0
next reply other threads:[~2026-11-01 9:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 9:36 Qu Wenruo [this message]
2026-11-01 9:36 ` [PATCH 1/2] btrfs-progs: subvolume: fix an uninitialized access Qu Wenruo
2026-11-01 9:36 ` [PATCH 2/2] btrfs-progs: trigger a sync before waiting for subvolumes to be dropped Qu Wenruo
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=cover.1793525519.git.wqu@suse.com \
--to=wqu@suse.com \
--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