[libvirt] [PATCH 6/7] fspool: default implementation of filesystem pools

Olga Krishtal okrishtal at virtuozzo.com
Thu Aug 25 10:54:36 UTC 2016


On 25/08/16 04:12, Daniel P. Berrange wrote:
> On Fri, Aug 19, 2016 at 06:03:34PM +0300, Olga Krishtal wrote:
>> Implementation is backend base as in case of storage pools.
>> This patch adds directory backend which is nothing more
>> than managing directories inside another one as starting
>> point.
>>
>> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy at virtuozzo.com>
>> ---
>>   configure.ac             |   33 +
>>   daemon/Makefile.am       |    4 +
>>   po/POTFILES.in           |    2 +
>>   src/Makefile.am          |   38 +
>>   src/driver.h             |    1 +
>>   src/fs/fs_backend.h      |   85 ++
>>   src/fs/fs_backend_dir.c  |  334 +++++++
>>   src/fs/fs_backend_dir.h  |    8 +
>>   src/fs/fs_driver.c       | 2164 ++++++++++++++++++++++++++++++++++++++++++++++
>>   src/fs/fs_driver.h       |   10 +
>>   src/libvirt.c            |   28 +
>>   src/libvirt_private.syms |    1 +
>>   12 files changed, 2708 insertions(+)
>>   create mode 100644 src/fs/fs_backend.h
>>   create mode 100644 src/fs/fs_backend_dir.c
>>   create mode 100644 src/fs/fs_backend_dir.h
>>   create mode 100644 src/fs/fs_driver.c
>>   create mode 100644 src/fs/fs_driver.h
>>
>> diff --git a/configure.ac b/configure.ac
>> index 8d7d63e..435b1ec 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -1647,6 +1647,35 @@ fi
>>   AM_CONDITIONAL([WITH_SECRETS], [test "$with_secrets" = "yes"])
>>   
>>   
>> +AC_ARG_WITH([fs-dir],
>> +  [AS_HELP_STRING([--with-fs-dir],
>> +    [with fs backend for fs driver @<:@default=yes@:>])],
>> +  [],[with_fs_dir=yes])
>> +
>> +if test "$with_libvirtd" = "no"; then
>> +  with_fs_dir=no
>> +fi
>> +
>> +if test "$with_fs_dir" = "yes" ; then
>> +  AC_DEFINE_UNQUOTED([WITH_FS_DIR], 1, [whether directory backend for fs driver is enabled])
>> +fi
>> +AM_CONDITIONAL([WITH_FS_DIR], [test "$with_fs_dir" = "yes"])
>> +
>> +with_fs=no
>> +for backend in dir; do
>> +    if eval test \$with_fs_$backend = yes; then
>> +        with_fs=yes
>> +        break
>> +    fi
>> +done
>> +if test $with_fs = yes; then
>> +    AC_DEFINE([WITH_FS], [1],
>> +      [Define to 1 if at least one fs backend is in use])
>> +fi
>> +AM_CONDITIONAL([WITH_FS], [test "$with_fs" = "yes"])
>> +
>> +
>
> Lets have all this in a separate m4/virt-fspool.m4 file
> and just call it via a macro LIBVIRT_FS_POOL_CHECK
>
>> +
>>   AC_ARG_WITH([storage-dir],
>>     [AS_HELP_STRING([--with-storage-dir],
>>       [with directory backend for the storage driver @<:@default=yes@:>@])],
>> @@ -2760,6 +2789,10 @@ AC_MSG_NOTICE([Sheepdog: $with_storage_sheepdog])
>>   AC_MSG_NOTICE([ Gluster: $with_storage_gluster])
>>   AC_MSG_NOTICE([     ZFS: $with_storage_zfs])
>>   AC_MSG_NOTICE([])
>> +AC_MSG_NOTICE([Fs Drivers])
>> +AC_MSG_NOTICE([])
>> +AC_MSG_NOTICE([     Dir: $with_fs_dir])
>> +AC_MSG_NOTICE([])
> Likewise move this and call it via LIBVIRT_FS_POOL_RESULT
>
>>   AC_MSG_NOTICE([Security Drivers])
>>   AC_MSG_NOTICE([])
>>   AC_MSG_NOTICE([ SELinux: $with_secdriver_selinux ($SELINUX_MOUNT)])
>
> Regards,
> Daniel

OK




More information about the libvir-list mailing list