Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs-progs: speed up "btrfs subvolume sync"
@ 2026-11-01  9:36 Qu Wenruo
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Qu Wenruo @ 2026-11-01  9:36 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-01  9:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-01  9:36 [PATCH 0/2] btrfs-progs: speed up "btrfs subvolume sync" Qu Wenruo
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox