[libvirt] [PATCH 5/9] storage: Use matchPoolSourceHost for NETFS

Peter Krempa pkrempa at redhat.com
Mon Apr 13 10:19:28 UTC 2015


On Thu, Apr 02, 2015 at 13:39:42 -0400, John Ferlan wrote:
> Rather than have duplicate code doing the same check, have the netfs
> matching processing code use the new matchPoolSourceHost.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/conf/storage_conf.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> index b3e930b..6ed0aa9 100644
> --- a/src/conf/storage_conf.c
> +++ b/src/conf/storage_conf.c
> @@ -2348,9 +2348,8 @@ 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) &&
> +                matchPoolSourceHost(&pool->def->source, &def->source))
>                  matchpool = pool;
>              break;
>          case VIR_STORAGE_POOL_SCSI:

ACK, no semantic change. (But of course the patch will need a change
after renaming the function.

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/20150413/d9019abf/attachment-0001.sig>


More information about the libvir-list mailing list