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

Peter Krempa pkrempa at redhat.com
Mon Dec 5 14:04:50 UTC 2016


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.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161205/f8566edc/attachment-0001.sig>


More information about the libvir-list mailing list