[libvirt] [PATCH v2 4/8] storage: Use virStoragePoolSourceMatchSingleHost for NETFS
Peter Krempa
pkrempa at redhat.com
Wed Apr 15 08:37:01 UTC 2015
On Mon, Apr 13, 2015 at 17:21:08 -0400, John Ferlan wrote:
> Rather than have duplicate code doing the same check, have the netfs
> matching processing code use the new virStoragePoolSourceMatchSingleHost.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/conf/storage_conf.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> index 313098b..bb89bb7 100644
> --- a/src/conf/storage_conf.c
> +++ b/src/conf/storage_conf.c
> @@ -2464,9 +2464,9 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
> matchpool = pool;
> break;
> case VIR_STORAGE_POOL_NETFS:
> - if ((STREQ(pool->def->source.dir, def->source.dir)) \
> - && (pool->def->source.nhost == 1 && def->source.nhost == 1) \
> - && (STREQ(pool->def->source.hosts[0].name, def->source.hosts[0].name)))
> + if (STREQ(pool->def->source.dir, def->source.dir) &&
> + virStoragePoolSourceMatchSingleHost(&pool->def->source,
NETFS pools don't use port for some reason, but it should be fine to use
the same function for it.
> + &def->source))
> matchpool = pool;
> break;
> case VIR_STORAGE_POOL_SCSI:
ACK,
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150415/bfc1fd32/attachment-0001.sig>
More information about the libvir-list
mailing list