[libvirt] [PATCH] storage: Create enough volumes for mpath pool

Eric Blake eblake at redhat.com
Mon Feb 14 16:40:14 UTC 2011


On 02/14/2011 06:48 AM, Osier Yang wrote:
> "virStorageBackendCreateVols":
>   "names->next" serves as condition expression for "do...while",
> however, "names" was shifted before, it then results in one less
> loop, and thus, one less volume will be created for mpath pool,
> the patch is to fix it.
> 

> @@ -243,9 +244,10 @@ virStorageBackendCreateVols(virStoragePoolObjPtr pool,
> 
>          /* Given the way libdevmapper returns its data, I don't see
>           * any way to avoid this series of casts. */
> -        names = (struct dm_names *)(((char *)names) + names->next);
> +        next = names->next;
> +        names = (struct dm_names *)(((char *)names) + next);
> 
> -    } while (names->next);
> +    } while (next);

ACK; worth including in 0.8.8.
-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110214/7b26dc82/attachment-0001.sig>


More information about the libvir-list mailing list