On 06/19/2014 07:59 AM, Peter Krempa wrote:
Use virStorageFileSimplifyPathInternal to canonicalize gluster paths
via a callback and use it for the unique volume path retrieval API.
---
src/storage/storage_backend_gluster.c | 80 +++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
+
+ realloc:
+ if (VIR_EXPAND_N(buf, bufsiz, 256) < 0)
Expanding by the same length each iteration is quadratic in behavior,
compared to expanding by a geometrically larger value (256 on iteration
1, 512 on iteration 2, ...). BUT, that is true only if you return to the
label more than once. However, gluster has some (current) hard-baked
limits of 256 as the maximum length, so you will only be repeating the
label at most once, so it really doesn't matter in this patch :)
ACK
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org