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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
> ---
>  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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]