On 01/24/2012 04:17 PM, MATSUDA, Daiki wrote:
I am happy that you provide the patches.
> These functions simply issue command to guest agent which
> should freeze or unfreeze all file systems within guest.
> ---
But qemuAgentFSFreeze() and qemuAgentFSThaw() are almost same. In
addition, qemu guest agent provides status option for FS Freezer. So,
could you change to following?
VIR_ENUM_DECL(qemuAgentFSFreezeCtlMode);
VIR_ENUM_IMPL(qemuAgentFSFreezeCtlMode,
QEMU_AGENT_FSFREEZE_LAST,
"guest-fsfreeze-freeze",
"guest-fsfreeze-thaw",
"guest-fsfreeze-status");
That would make sense if we planned on exposing guest freeze and thaw
directly to the user. But right now, we are only planning on using
guest freeze and thaw internally as part of our higher-level snapshot
create function, where we do freeze and thaw in a balanced pair, and
where our command is blocking so that there is no need to call status
(that is, if we exposed a libvirt command to query the status, you would
only ever be able to call it when we are not in the middle of a
snapshot, and thus the fs would always report that it is in a thawed
state, unless someone has gone behind libvirt's back, at which point why
are you using libvirt).
Maybe you can convince me otherwise that we need to expose these three
lower-level states to the user, rather than using them internally only
for the implementation of the higher-level commands like
snapshot-create, but unless we have a reason to expose this much detail,
I don't think we need to make your proposed change.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org