[libvirt] [PATCH v3 2/3] storage: optimize calls to virStorageFileInit and friends

Prasanna Kalever pkalever at redhat.com
Tue Dec 6 17:09:19 UTC 2016


On Mon, Dec 5, 2016 at 7:34 PM, Peter Krempa <pkrempa at redhat.com> wrote:
> On Mon, Dec 05, 2016 at 18:55:18 +0530, Prasanna Kumar Kalever wrote:
>> Currently, each among virStorageFileGetMetadataRecurse,
>> qemuSecurityChownCallback, qemuDomainSnapshotPrepareDiskExternal and
>> qemuDomainSnapshotCreateSingleDiskActive makes calls to virStorageFileInit
>> and friends for simple operations like stat, read headers, chown and etc.
>>
>> This patch optimize/unify calls to virStorageFileInit and virStorageFileDeinit.
>>
>> Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever at redhat.com>
>> ---
>>  src/qemu/qemu_domain.c       |  2 +-
>>  src/qemu/qemu_domain.h       |  5 +++++
>>  src/qemu/qemu_driver.c       | 40 +++++++++++++++++++++++++++++----------
>>  src/qemu/qemu_process.c      | 45 ++++++++++++++++++++++++++++++++++++++++++++
>>  src/qemu/qemu_process.h      |  4 ++++
>>  src/storage/storage_driver.c | 11 ++++++++---
>>  6 files changed, 93 insertions(+), 14 deletions(-)
>
> After this patch qemuxml2argvtest gets stuck. This is because you call
> the code accessing the volumes in the test code which attempts to call
> gluster. This is not acceptable in tests. There should be some existing
> mechanisms which skips certain parts of the process in tests.
>
> See how VIR_QEMU_PROCESS_START_PRETEND is used.

That's an intelligent clue. It really helped a lot.
Caught it, It was in qemuProcessInit.

Thanks,
--
Prasanna

>
> Peter




More information about the libvir-list mailing list