Re: [PATCH 2/3] storage: Create common file/dir pool backend helpers

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

 




On 01/26/2017 11:39 AM, Roman Bogorodskiy wrote:
>   John Ferlan wrote:
> 
>> Move some pool functions to storage_util to create local/common helpers
>> using the same naming syntax as the existing upload, download, and wipe
>> virStorageBackend*Local API's.
>>
>> In the process of doing so, found a few API's that can now become local
>> to storage_util. In order to distinguish between local/external - I
>> changed the names of the now local only ones from "virStorageBackend..."
>> to just "storageBackend..."
>>
>> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
>> ---
>>  src/storage/storage_backend_fs.c | 383 ++---------------------------------
>>  src/storage/storage_util.c       | 420 ++++++++++++++++++++++++++++++++++++---
>>  src/storage/storage_util.h       |  37 ++--
>>  3 files changed, 432 insertions(+), 408 deletions(-)
>>
>> diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
> 
> ...
> 
>> +int
>> +virStorageBackendUmountLocal(virStoragePoolObjPtr pool)
>> +{
>> +    int ret = -1;
>> +    virCommandPtr cmd = virCommandNewArgList(UMOUNT, pool->def->target.path,
>> +                                             NULL);
>> +
>> +    if (virCommandRun(cmd, NULL) < 0)
>> +        goto cleanup;
>> +
>> +    ret = 0;
>> +
>> + cleanup:
>> +    virCommandFree(cmd);
>> +    return ret;
>> +}
> 
> This fails to build if the fs storage backend is not enabled:
> 
> gmake[3]: Entering directory '/usr/home/novel/code/libvirt/src'
>   CC       storage/libvirt_driver_storage_impl_la-storage_util.lo
> storage/storage_util.c:2810:46: error: use of undeclared identifier 'UMOUNT'
>     virCommandPtr cmd = virCommandNewArgList(UMOUNT, pool->def->target.path,
>                                              ^
> 1 error generated.
> gmake[3]: *** [Makefile:9325: storage/libvirt_driver_storage_impl_la-storage_util.lo] Error 1
> 
> Because UMOUNT is only checked in m4/virt-storage-fs.m4. So I guess it
> either needs to be moved back to storage_backend_fs.c (which is unlikely
> because I guess you moved that for a reason) or the UMOUNT check moved
> to some more generic place.
> 
> Roman Bogorodskiy
> 

Yep - our internal builds caught it too - just formulating a patch now
and will send/push shortly.

Sorry -

John

--
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]
  Powered by Linux