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

Re: [libvirt] [PATCH] storage: Do not use comma as seperator for lvs output

于 2011年09月21日 18:22, Daniel P. Berrange 写道:
On Wed, Sep 21, 2011 at 05:07:56PM +0800, Osier Yang wrote:
* src/storage/storage_backend_logical.c:

If a logical vol is created with multiple stripes. (e.g. --stripes 3),
the "device" field of lvs output will have multiple fileds which are
seperated by comma. It means the RE we write in the codes will not
work well anymore. E.g. (lvs output for a stripped vol, uses "#" as
seperator here):

If the 'lv' output contains multiple paths tin the "device" field,
then the issue of ',' vs '#' is the least of our worries.

We use the path in the device field to populate the volume extents

    if ((vol->source.extents[vol->source.nextent].path =
          strdup(groups[3])) == NULL) {
         return -1;

     vol->source.extents[vol->source.nextent].start = offset * size;
     vol->source.extents[vol->source.nextent].end = (offset * size) + length;

This code will need significantly rewriting to cope with multiple
device paths when parsing the output, before we can make the change
you suggest here.


Hmm, agreed, will make a new patch to cover this. Thanks


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