[libvirt] [PATCH v2 1/5] Implement public API for virDomainGetFSInfo

Eric Blake eblake at redhat.com
Thu Nov 20 19:09:56 UTC 2014


On 11/17/2014 04:26 PM, Tomoki Sekiyama wrote:
> virDomainGetFSInfo returns a list of filesystems information mounted in the
> guest, which contains mountpoints, device names, filesystem types, and
> device aliases named by libvirt. This will be useful, for example, to
> specify mountpoints to fsfreeze when taking snapshot of a part of disks.
> 
> Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama at hds.com>
> ---
>  include/libvirt/libvirt-domain.h |   21 ++++++++++++
>  src/driver-hypervisor.h          |    6 +++
>  src/libvirt.c                    |   66 ++++++++++++++++++++++++++++++++++++++
>  src/libvirt_public.syms          |    6 +++
>  4 files changed, 99 insertions(+)
> 

> +++ b/include/libvirt/libvirt-domain.h
> @@ -3456,6 +3456,27 @@ int virDomainFSThaw(virDomainPtr dom,
>                      unsigned int nmountpoints,
>                      unsigned int flags);
>  
> +/**
> + * virDomainFSInfo:
> + *
> + * The data structure containing mounted file systems within a guset
> + *
> + */
> +typedef struct _virDomainFSInfo virDomainFSInfo;
> +typedef virDomainFSInfo *virDomainFSInfoPtr;
> +struct _virDomainFSInfo {
> +    char *mountpoint; /* path to mount point */
> +    char *name;       /* device name in the guest (e.g. "sda1") */
> +    char *type;       /* filesystem type */
> +    char **devAlias;  /* NULL-terminated array of disk device aliases */
> +};

Is it worth also having a size_t ndevAlias that says how long the array
is?  It may make client life easier if they have an up-front count.

-- 
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: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141120/8b6533d4/attachment-0001.sig>


More information about the libvir-list mailing list