diff options
author | Wanlong Gao <gaowanlong@cn.fujitsu.com> | 2012-08-30 17:25:47 +0800 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-08-30 10:47:26 +0100 |
commit | 7036a3bccfab22eb4ed2e66ef0e69a058264e323 (patch) | |
tree | f1df0c790268f6fcd613e7a9b7d8013ca7912ba1 /generator | |
parent | bcbad66b185048ee49f58c49ae382f6e69d3c666 (diff) | |
download | libguestfs-7036a3bccfab22eb4ed2e66ef0e69a058264e323.tar.gz libguestfs-7036a3bccfab22eb4ed2e66ef0e69a058264e323.tar.xz libguestfs-7036a3bccfab22eb4ed2e66ef0e69a058264e323.zip |
NEW API:xfs:xfs_repair
Add a new api xfs_repair for repairing an XFS filesystem.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
RWMJ:
- Fix non-error return path so it doesn't send two replies.
- Document return code.
Diffstat (limited to 'generator')
-rw-r--r-- | generator/generator_actions.ml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 62903338..0033e3ac 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -9682,6 +9682,34 @@ C<key> is the name, C<t> is the type, and C<val> is the data. This is a wrapper around the L<hivex(3)> call of the same name." }; + { defaults with + name = "xfs_repair"; + style = RInt "status", [Dev_or_Path "device"], [OBool "forcelogzero"; OBool "nomodify"; OBool "noprefetch"; OBool "forcegeometry"; OInt64 "maxmem"; OInt64 "ihashsize"; OInt64 "bhashsize"; OInt64 "agstride"; OString "logdev"; OString "rtdev"]; + proc_nr = Some 366; + optional = Some "xfs"; + tests = [ + InitEmpty, IfAvailable "xfs", TestRun ( + [["part_disk"; "/dev/sda"; "mbr"]; + ["mkfs"; "xfs"; "/dev/sda1"; ""; "NOARG"; ""; ""]; + ["xfs_repair"; "/dev/sda1"; ""; "true"; ""; ""; ""; ""; ""; ""; "NOARG"; "NOARG"] + ]) + ]; + shortdesc = "repair an XFS filesystem"; + longdesc = "\ +Repair corrupt or damaged XFS filesystem on C<device>. + +The filesystem is specified using the C<device> argument which should be +the device name of the disk partition or volume containing the filesystem. +If given the name of a block device, C<xfs_repair> will attempt to find +the raw device associated with the specified block device and will use +the raw device instead. + +Regardless, the filesystem to be repaired must be unmounted, otherwise, +the resulting filesystem may be inconsistent or corrupt. + +The returned status indicates whether filesystem corruption was +detected (returns C<1>) or was not detected (returns C<0>)." }; + ] (* Non-API meta-commands available only in guestfish. |