Re: [PATCHv4 2/7] storage: Add APIs for internal handling of files via the storage driver

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

 



On 02/03/2014 09:54 AM, Peter Krempa wrote:
> Some remote filesystems are not accessible via the local filesystem
> calls, but libvirt needs means to do operations on such files.
> 
> This patch adds internal APIs into the storage driver that will allow
> operations on various networked and other filesystems.
> ---
>  docs/hvsupport.pl        |   4 +-
>  po/POTFILES.in           |   1 +
>  src/Makefile.am          |   1 +
>  src/check-drivername.pl  |   1 +
>  src/driver.h             |  30 +++++++-
>  src/libvirt_private.c    | 176 +++++++++++++++++++++++++++++++++++++++++++++++
>  src/libvirt_private.h    |  61 ++++++++++++++++
>  src/libvirt_private.syms |   9 +++
>  8 files changed, 281 insertions(+), 2 deletions(-)
>  create mode 100644 src/libvirt_private.c
>  create mode 100644 src/libvirt_private.h
> 

> +++ b/src/Makefile.am
> @@ -173,6 +173,7 @@ DRIVER_SOURCES =							\
>  		fdstream.c fdstream.h					\
>  		$(NODE_INFO_SOURCES)					\
>  		libvirt.c libvirt_internal.h				\
> +		libvirt_private.h libvirt_private.c \
>  		locking/lock_manager.c locking/lock_manager.h		\

Alignment of \ looks off.


> +virStorageFilePtr
> +virStorageFileInitFromDiskDef(virConnectPtr conn,
> +                              virDomainDiskDefPtr disk)
> +{

> +
> +    if (file->driver->storageFileInit) {
> +        if (file->driver->storageFileInit(file) < 0)

This could be joined with && instead of nested if.


> +
> +
> +virStorageFilePtr
> +virStorageFileInitFromSnapshotDef(virConnectPtr conn,
> +                                  virDomainSnapshotDiskDefPtr disk)

> +
> +    if (file->driver->storageFileInit) {
> +        if (file->driver->storageFileInit(file) < 0)
> +            goto error;

Same here.

> +/**
> + * virStorageFileUnlink: Unlink storage file via storage driver
> + *
> + * @file: file structure poiniting to the file

s/poiniting/pointing/

Those are all minor.  Wait for the review of the full series before
pushing this, but I'm okay with ACK for htis one.

-- 
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]