[libvirt] [PATCHv5 03/19] storage: gluster: Add backend to return unique storage file path
Peter Krempa
pkrempa at redhat.com
Tue Jun 24 08:55:13 UTC 2014
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140624/edf688d4/attachment-0001.sig>
More information about the libvir-list
mailing list