On 06/24/14 05:35, Eric Blake wrote:
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 :)
Also having links longer than that seems insane. This loop will not be
iterated much.
ACK
I've pushed 1-3 which enables libvirt to work with gluster backing
chains now.
I'll repost the rest as it depends on your active commit series and the
last version caused rebase conflicts.
Peter