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 /src | |
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 'src')
-rw-r--r-- | src/MAX_PROC_NR | 2 | ||||
-rw-r--r-- | src/guestfs.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR index 1473a88f..e01062f1 100644 --- a/src/MAX_PROC_NR +++ b/src/MAX_PROC_NR @@ -1 +1 @@ -281 +282 diff --git a/src/guestfs.c b/src/guestfs.c index 488b6586..79fc5bfa 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -189,10 +189,8 @@ guestfs_close (guestfs_h *g) guestfs___free_inspect_info (g); /* Try to sync if autosync flag is set. */ - if (g->autosync && g->state == READY) { - guestfs_umount_all (g); - guestfs_sync (g); - } + if (g->autosync && g->state == READY) + guestfs_internal_autosync (g); /* Remove any handlers that might be called back before we kill the * subprocess. |