diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-01-28 15:28:25 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-01-28 15:28:25 +0000 |
commit | d2636b0984830d950423dadd936114ff242c4a00 (patch) | |
tree | d773c806f380fdaaeee7a0393e990f7156e2ad5e /generator | |
parent | 1d999540bddd7aea7c2d0fef8b15223d4acc645f (diff) | |
download | libguestfs-d2636b0984830d950423dadd936114ff242c4a00.tar.gz libguestfs-d2636b0984830d950423dadd936114ff242c4a00.tar.xz libguestfs-d2636b0984830d950423dadd936114ff242c4a00.zip |
Add a new internal-autosync API to perform autosync.
Instead of explicitly calling umount-all; sync, we add a daemon
function called internal-autosync which does the same.
Apart from slightly simplifying the process of closing the handle, the
main advantage is we can modify the daemon for the standalone case so
that internal-autosync does not do the umount-all operation.
Diffstat (limited to 'generator')
-rw-r--r-- | generator/generator_actions.ml | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 77f13580..0ae87902 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -282,8 +282,8 @@ If C<NULL> then no options are added."); "set autosync mode", "\ If C<autosync> is true, this enables autosync. Libguestfs will make a -best effort attempt to run C<guestfs_umount_all> followed by -C<guestfs_sync> when the handle is closed +best effort attempt to make filesystems consistent and synchronized +when the handle is closed (also if the program exits without closing handles). This is enabled by default (since libguestfs 1.5.24, previously it was @@ -3842,7 +3842,7 @@ pathnames, as in the example code above. For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503> Autosync [see C<guestfs_set_autosync>, this is set by default on -handles] means that C<guestfs_umount_all> is called when the handle +handles] can cause C<guestfs_umount_all> to be called when the handle is closed which can also trigger these issues."); ("rmmountpoint", (RErr, [String "exemptpath"], []), 149, [], @@ -5776,6 +5776,16 @@ C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. These two numbers, multiplied together, give the resulting size of the minimal filesystem in bytes."); + ("internal_autosync", (RErr, [], []), 282, [NotInFish; NotInDocs], + [], + "internal autosync operation", + "\ +This command performs the autosync operation just before the +handle is closed. You should not call this command directly. +Instead, use the autosync flag (C<guestfs_set_autosync>) to +control whether or not this operation is performed when the +handle is closed."); + ] let all_functions = non_daemon_functions @ daemon_functions |