btrfs-progs icon indicating copy to clipboard operation
btrfs-progs copied to clipboard

btrfs-progs: subvolume: use BTRFS_IOC_SUBVOL_SYNC_WAIT for sync

Open SidongYang opened this issue 6 months ago • 2 comments

This patch uses BTRFS_IOC_SUBVOL_SYNC_WAIT ioctl in subvolume sync command before checking periodically and adds an option to not to use sync wait ioctl call and force to check periodically. This patch calls a new function wait_for_subvolume_sync() that calls BTRFS_IOC_SUBVOL_SYNC_WAIT for each subvol.

Issue: #953

SidongYang avatar May 25 '25 12:05 SidongYang

Thanks, this is still missing some usability bits. The new ioctl should be preferred if it exists, there's a mode to check it. Either it works or its -ENOTTY. The force argument is misleading, both ways work but with different capabilities. This should be explained in the help text and documentation.

kdave avatar May 30 '25 16:05 kdave

Hi, @kdave ! Thanks for a comment. I've fixed this.

  • print error message for -ENOTTY
  • force_to_check -> periodic
  • change usage message for this patch

SidongYang avatar May 31 '25 15:05 SidongYang

Thanks, added to devel.

kdave avatar Jul 18 '25 00:07 kdave