Skip to content

btrfs-progs: speed up "btrfs subvolume sync"

Qu Wenruo linux-btrfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs-progs: subvolume: fix an uninitialized accesscmds/subvolume.c+1 -10 replies
2/2btrfs-progs: trigger a sync before waiting for subvolumes to be droppedDocumentation/btrfs-subvolume.rst cmds/subvolume.c+11 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] btrfs-progs: speed up "btrfs subvolume sync"

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