Skip to content

btrfs-progs: subvolume: use BTRFS_IOC_SUBVOL_SYNC_WAIT for sync #989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

SidongYang
Copy link

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

@kdave kdave force-pushed the devel branch 6 times, most recently from ef43ce6 to 3eff852 Compare May 30, 2025 14:14
@kdave
Copy link
Owner

kdave commented May 30, 2025

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.

@SidongYang SidongYang force-pushed the subvol-sync-with-ioctl branch from 5f72fd7 to 4f3c256 Compare May 31, 2025 15:48
@SidongYang
Copy link
Author

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

@kdave kdave force-pushed the devel branch 4 times, most recently from dafafca to 5d47f58 Compare June 20, 2025 19:34
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: kdave#953
Signed-off-by: Sidong Yang <[email protected]>
@SidongYang SidongYang force-pushed the subvol-sync-with-ioctl branch from 4f3c256 to 4ab0a2d Compare June 28, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants