[libvirt] [PATCH v4 0/5] Expose FSFreeze/FSThaw within the guest as API

Eric Blake eblake at redhat.com
Fri Mar 28 00:32:31 UTC 2014


On 03/27/2014 05:54 PM, Tomoki Sekiyama wrote:
> This sounds reasonable for me to add disks parameters.
> I will try adding them in next version. Then the api will look like:
> 
> int virDomainFSFreeze(virDomainPtr dom, char** disks, int ndisks, unsigned
> int flags);
>  and
> int virDomainFSThaw(virDomainPtr dom, unsigned int flags);
> 
> 
> I feel that thaw api shouldn't have disks parameter and thaw every frozen
> disk
> in order to simplify fsfreeze exclusion. Is it acceptable?

Maybe, maybe not.  It means on a guest with 2 disks, I can't freeze one,
then freeze the second - I can only have one atomic freeze at a time,
and therefore thaw needs no parameters because it is always thawing the
most recent freeze action.

But we already know from painful experience that assuming at most one
active job at a time doesn't scale well.  Maybe it should be:

int virDomainFSFreeze(...char **disks...) returns a handle
virDomainFSThaw(virDomainPtr dom, int handle, unsigned int flags);

where FSThaw then thaws according to the handle returned by a freeze.
That would allow me to do:

interleaved subsets:
freeze A => returns 1
freeze B => returns 2
thaw 1 => thaws A
thaw 2 => thaws B

nested subsets
freeze A => returns 3
freeze B => returns 4
thaw 4 => thaws B
thaw 3 => thaws A

> 
> BTW, in current qemu-kvm, disk device names in Linux guests don't seem to
> always
> correspond to that is specified by libvirt (e.g. the first virtio storage
> is
> named "vda" even if it is specified "vdz" in the libvirt's xml).

Correct.  Libvirt specifies destination names as a hint that must be
unique to libvirt, but which has no bearing on the names used by the guest.

> Until
> this is
> resolved, guest agent may ignore the disks parameter and fallback to
> freezing
> all mounted filesystems. But still, having disks parameter in the API level
> would be good for future extension.

Hmm, interesting point.  Really, that means we want some way to map the
strings understood by libvirt API into the disk names understood by the
guest agent, and I don't know if we have such a means.  But I guess this
is an issue even for the existing virDomainSnapshotCreateXML with the
quiesce flag, so it's not a new problem.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140327/f1bc6ace/attachment-0001.sig>


More information about the libvir-list mailing list