[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]