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