storage: Do not use comma as seperator for lvs output
storage: Do not use comma as seperator for lvs output

* src/storage/storage_backend_logical.c:

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

test_stripes##fSLSZH-zAS2-yAIb-n4mV-Al9u-HA3V-oo9K1B#\
/dev/sdc1(10240),/dev/sdd1(0)#42949672960#4194304

The RE we use:

    const char *regexes[] = {
        "^\\s*(\\S+),(\\S*),(\\S+),(\\S+)\\((\\S+)\\),(\\S+),([0-9]+),?\\s*$"
    };

Also the RE doesn't match the "devices" field of striped vol properly,
it contains multiple "device path" and "offset".

This patch mainly does:
    1) Change the seperator into "#"
    2) Change the RE for "devices" field from "(\\S+)\\((\\S+)\\)"
       into "(\\S+)".
    3) Add two new options for lvs command, (segtype, stripes)
    4) Extend the RE to match the value for the two new fields.
    5) Parse the "devices" field seperately in virStorageBackendLogicalMakeVol,
       multiple "extents" info are generated if the vol is striped. The
       number of "extents" is equal to the stripes number of the striped vol.

A incidental fix: (virStorageBackendLogicalMakeVol)
    Free "vol" if it's new created and there is error.

Demo on striped vol with the patch applied:

% virsh vol-dumpxml /dev/test_vg/vol_striped2
<volume>
  <name>vol_striped2</name>
  <key>QuWqmn-kIkZ-IATt-67rc-OWEP-1PHX-Cl2ICs</key>
  <source>
    <device path='/dev/sda5'>
      <extent start='79691776' end='88080384'/>
    </device>
    <device path='/dev/sda6'>
      <extent start='62914560' end='71303168'/>
    </device>
  </source>
  <capacity>8388608</capacity>
  <allocation>8388608</allocation>
  <target>
    <path>/dev/test_vg/vol_striped2</path>
    <permissions>
      <mode>0660</mode>
      <owner>0</owner>
      <group>6</group>
      <label>system_u:object_r:fixed_disk_device_t:s0</label>
    </permissions>
  </target>
</volume>

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=727474

usc-isi/libvirt,novel/fbsd-libvirt,jeckersb/libvirt,crobinso/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,nertpinx/libvirt,siboulet/libvirt-openvz,agx/libvirt,taget/libvirt,wiedi/libvirt,rlaager/libvirt,leilihh/libvirt,soulxu/libvirt-xuhj,siboulet/libvirt-openvz,nertpinx/libvirt,agx/libvirt,trainstack/libvirt,taget/libvirt,dumbbell/libvirt,cbosdo/libvirt,zippy2/libvirt,shugaoye/libvirt,trainstack/libvirt,novel/fbsd-libvirt,wiedi/libvirt,danwent/libvirt-ovs,VenkatDatta/libvirt,leilihh/libvirt,trainstack/libvirt,fabianfreyer/libvirt,rmarwaha/libvirt1,foomango/libvirt,trainstack/libvirt,soulxu/libvirt-xuhj,leilihh/libvirt,jfehlig/libvirt,usc-isi/libvirt,dumbbell/libvirt,emaste/libvirt,libvirt/libvirt,libvirt/libvirt,iam-TJ/libvirt,shugaoye/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,agx/libvirt,jfehlig/libvirt,nertpinx/libvirt,leilihh/libvirt,siboulet/libvirt-openvz,soulxu/libvirt-xuhj,wiedi/libvirt,zhlcindy/libvirt-1.1.4-maintain,fabianfreyer/libvirt,rmarwaha/libvirt,emaste/libvirt,datto/libvirt,emaste/libvirt,novel/fbsd-libvirt,olafhering/libvirt,wiedi/libvirt,rlaager/libvirt,rmarwaha/libvirt,fabianfreyer/libvirt,rlaager/libvirt,foomango/libvirt,shugaoye/libvirt,foomango/libvirt,elmarco/libvirt,trainstack/libvirt,rmarwaha/libvirt,elmarco/libvirt,foomango/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,wiedi/libvirt,zippy2/libvirt,wiedi/libvirt,elmarco/libvirt,dumbbell/libvirt,dumbbell/libvirt,elmarco/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,warewolf/libvirt,nertpinx/libvirt,shugaoye/libvirt,agx/libvirt,foomango/libvirt,jeckersb/libvirt,iam-TJ/libvirt,datto/libvirt,rmarwaha/libvirt,crobinso/libvirt,rmarwaha/libvirt,emaste/libvirt,warewolf/libvirt,olafhering/libvirt,rmarwaha/libvirt1,novel/fbsd-libvirt,eskultety/libvirt,iam-TJ/libvirt,soulxu/libvirt-xuhj,usc-isi/libvirt,VenkatDatta/libvirt,olafhering/libvirt,emaste/libvirt,shugaoye/libvirt,andreabolognani/libvirt,warewolf/libvirt,bjzhang/libvirt,novel/fbsd-libvirt,crobinso/libvirt,cbosdo/libvirt,rlaager/libvirt,eskultety/libvirt,trainstack/libvirt,datto/libvirt,jeckersb/libvirt,jeckersb/libvirt,andreabolognani/libvirt,trainstack/libvirt,leilihh/libvirt,eskultety/libvirt,rmarwaha/libvirt1,datto/libvirt,jeckersb/libvirt,dumbbell/libvirt,libvirt/libvirt,bjzhang/libvirt,emaste/libvirt,danwent/libvirt-ovs,eskultety/libvirt,novel/fbsd-libvirt,iam-TJ/libvirt,emaste/libvirt,zhlcindy/libvirt-1.1.4-maintain,zhlcindy/libvirt-1.1.4-maintain,novel/fbsd-libvirt,zippy2/libvirt,dumbbell/libvirt,rmarwaha/libvirt1,cbosdo/libvirt,siboulet/libvirt-openvz,jardasgit/libvirt,rmarwaha/libvirt1,novel/fbsd-libvirt,usc-isi/libvirt,wiedi/libvirt,nertpinx/libvirt,bjzhang/libvirt,eskultety/libvirt,bjzhang/libvirt,novel/fbsd-libvirt,warewolf/libvirt,olafhering/libvirt,taget/libvirt,soulxu/libvirt-xuhj,rmarwaha/libvirt,iam-TJ/libvirt,rlaager/libvirt,danwent/libvirt-ovs,jeckersb/libvirt,siboulet/libvirt-openvz,zippy2/libvirt,iam-TJ/libvirt,jfehlig/libvirt,leilihh/libvirt,jeckersb/libvirt,cbosdo/libvirt,elmarco/libvirt,cbosdo/libvirt,crobinso/libvirt,zhlcindy/libvirt-1.1.4-maintain,iam-TJ/libvirt,danwent/libvirt-ovs,VenkatDatta/libvirt,andreabolognani/libvirt,jardasgit/libvirt,taget/libvirt,datto/libvirt,agx/libvirt,bjzhang/libvirt,libvirt/libvirt,rmarwaha/libvirt1,usc-isi/libvirt,jardasgit/libvirt,warewolf/libvirt,jardasgit/libvirt,warewolf/libvirt,warewolf/libvirt,danwent/libvirt-ovs,taget/libvirt,zhlcindy/libvirt-1.1.4-maintain