New API: Replace btrfs-fsck with btrfs-scrub-full

The old btrfs-fsck API used "btrfs check" which appears to be broken
or deprecated.  The real tool you should use is "btrfs scrub".  We
have already implemented that API, but it is very awkward to use from
libguestfs.  In particular there's no existing way to run the scrub
and wait for it to finish.

Fix this by deprecating btrfs-fsck.  Implement a new API
btrfs-scrub-full which runs btrfs scrub in the foreground, waits for
it to finish, and handles errors.  It's much more like fsck tools in
other filesystems.

Thanks: Eric Sandeen
Fixes: https://issues.redhat.com/browse/RHEL-91936
This commit is contained in:
Richard W.M. Jones
2025-05-15 21:18:14 +01:00
committed by rwmjones
parent 1c2b94f095
commit ea3dd97f1d
7 changed files with 78 additions and 15 deletions

View File

@@ -520,6 +520,7 @@ let proc_nr = [
515, "findfs_partlabel";
516, "command_out";
517, "sh_out";
518, "btrfs_scrub_full";
]
(* End of list. If adding a new entry, add it at the end of the list