[Libvir] Repository for work-in-progress storage patches

Daniel P. Berrange berrange at redhat.com
Sat Jan 19 17:57:46 UTC 2008

On Sat, Jan 19, 2008 at 01:47:30PM +0000, Richard W.M. Jones wrote:
> This function confuses me a bit.  It takes a virStoragePoolPtr as 
> parameter, but it only uses pool->conn.  The other two 
> virStorageVolLookupBy* functions take a virConnectPtr directly.

There are 3 levels of unique identifiers in storage volumes

  - name - unique within the scope of a Pool
  - key - unique across any machine accessing the same pool
  - path - unique within scope of a host (optionally across any host,
           if the pool impl supports that).

So, since name is unique within scope of a volume, while the others
are unique within scope of a host, the virStorageVolLookupByName
method is different, taking a virStoragePoolPtr instead of a 

>         return pool->conn->storageDriver->volLookupByName (pool, name);
>        /* ^^ is a red herring, since it's not implemented in
>           anything except the remote driver, hence useless */

It is also in the storage_driver.c - storageVolumeLookupByName

|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

More information about the libvir-list mailing list