diff options
author | Michael Roth <mdroth@linux.vnet.ibm.com> | 2012-04-16 19:52:17 -0500 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2012-04-30 08:41:40 -0500 |
commit | 9e8aded432884477bcd4fa1c7e849a196412bcc4 (patch) | |
tree | 6b0f98e3297c88596055642be15e3178fbb5f409 /qapi-schema-guest.json | |
parent | a8b69b8e2431edfcb6c4cfb069787e9071d6235b (diff) |
qemu-ga: improve recovery options for fsfreeze
guest-fsfreeze-thaw relies on state information obtained from
guest-fsfreeze-freeze to determine what filesystems to unfreeze.
This is unreliable due to the fact that that state does not account
for FIFREEZE being issued by other processes, or previous instances
of qemu-ga. This means in certain situations we cannot thaw
filesystems even with a responsive qemu-ga instance at our disposal.
This patch allows guest-fsfreeze-thaw to be issued unconditionally.
It also adds some additional logic to allow us to thaw filesystems
regardless of how many times the filesystem's "frozen" refcount has
been incremented by any guest processes.
Also, guest-fsfreeze-freeze now operates atomically: on success all
freezable filesystems are frozen, and on error all filesystems are
thawed. The ambiguous "GUEST_FSFREEZE_STATUS_ERROR" state is no
longer entered.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qapi-schema-guest.json')
-rw-r--r-- | qapi-schema-guest.json | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/qapi-schema-guest.json b/qapi-schema-guest.json index cf18876c57..0eedb98765 100644 --- a/qapi-schema-guest.json +++ b/qapi-schema-guest.json @@ -296,14 +296,10 @@ # # @frozen: all non-network guest filesystems frozen # -# @error: failure to thaw 1 or more -# previously frozen filesystems, or failure to open a previously -# cached filesytem (filesystem unmounted/directory changes, etc). -# # Since: 0.15.0 ## { 'enum': 'GuestFsfreezeStatus', - 'data': [ 'thawed', 'frozen', 'error' ] } + 'data': [ 'thawed', 'frozen' ] } ## # @guest-fsfreeze-status: @@ -312,6 +308,10 @@ # # Returns: GuestFsfreezeStatus ("thawed", "frozen", etc., as defined below) # +# Note: This may fail to properly report the current state as a result of +# qemu-ga having been restarted, or other guest processes having issued +# an fs freeze/thaw. +# # Since: 0.15.0 ## { 'command': 'guest-fsfreeze-status', @@ -320,9 +320,10 @@ ## # @guest-fsfreeze-freeze: # -# Sync and freeze all non-network guest filesystems +# Sync and freeze all freezable, local guest filesystems # -# Returns: Number of file systems frozen on success +# Returns: Number of file systems currently frozen. On error, all filesystems +# will be thawed. # # Since: 0.15.0 ## @@ -332,10 +333,15 @@ ## # @guest-fsfreeze-thaw: # -# Unfreeze frozen guest fileystems +# Unfreeze all frozen guest filesystems +# +# Returns: Number of file systems thawed by this call # -# Returns: Number of file systems thawed -# If error, -1 (unknown error) or -errno +# Note: if return value does not match the previous call to +# guest-fsfreeze-freeze, this likely means some freezable +# filesystems were unfrozen before this call, and that the +# filesystem state may have changed before issuing this +# command. # # Since: 0.15.0 ## |