[libvirt] [PATCH 2/2] conf: drop extra storage probe

Martin Kletzander mkletzan at redhat.com
Tue Apr 29 11:12:58 UTC 2014


On Mon, Apr 28, 2014 at 09:53:55PM -0600, Eric Blake wrote:
>All callers of virStorageFileGetMetadataFromBuf were first calling
>virStorageFileProbeFormatFromBuf, to learn what format to pass in.
>But this function is already wired to do the exact same probe if
>the incoming format is VIR_STORAGE_FILE_AUTO, so it's simpler to
>just refactor the probing into the central function.
>
>* src/util/virstoragefile.h (virStorageFileGetMetadataFromBuf):
>Drop parameter.
>(virStorageFileProbeFormatFromBuf): Drop declaration.
>* src/util/virstoragefile.c (virStorageFileGetMetadataFromBuf):
>Do probe here instead of in callers.
>(virStorageFileProbeFormatFromBuf): Make static.
>* src/libvirt_private.syms (virstoragefile.h): Drop function.
>* src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
>Update caller.
>* src/storage/storage_backend_gluster.c
>(virStorageBackendGlusterRefreshVol): Likewise.
>
>Signed-off-by: Eric Blake <eblake at redhat.com>
>---
> src/libvirt_private.syms              |  1 -
> src/storage/storage_backend_fs.c      |  8 --------
> src/storage/storage_backend_gluster.c |  5 -----
> src/util/virstoragefile.c             | 17 +++++++----------
> src/util/virstoragefile.h             |  7 ++-----
> 5 files changed, 9 insertions(+), 29 deletions(-)
>

ACK,

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140429/fb05653d/attachment-0001.sig>


More information about the libvir-list mailing list