libvirt/src/storage
Eric Blake 318ea3cb77 storage: initial support for linking with libgfapi
We support gluster volumes in domain XML, so we also ought to
support them as a storage pool.  Besides, a future patch will
want to take advantage of libgfapi to handle the case of a
gluster device holding qcow2 rather than raw storage, and for
that to work, we need a storage backend that can read gluster
storage volume contents.  This sets up the framework.

Note that the new pool is named 'gluster' to match a
<disk type='network'><source protocol='gluster'> image source
already supported in a <domain>; it does NOT match the
<pool type='netfs'><source><target type='glusterfs'>,
since that uses a FUSE mount to a local file name rather than
a network name.

This and subsequent patches have been tested against glusterfs
3.4.1 (available on Fedora 19); there are likely bugs in older
versions that may prevent decent use of gfapi, so this patch
enforces the minimum version tested.  A future patch may lower
the minimum.  On the other hand, I hit at least two bugs in
3.4.1 that will be fixed in 3.5/3.4.2, where it might be worth
raising the minimum: glfs_readdir is nicer to use than
glfs_readdir_r [1], and glfs_fini should only return failure on
an actual failure [2].

[1] http://lists.gnu.org/archive/html/gluster-devel/2013-10/msg00085.html
[2] http://lists.gnu.org/archive/html/gluster-devel/2013-10/msg00086.html

* configure.ac (WITH_STORAGE_GLUSTER): New conditional.
* m4/virt-gluster.m4: new file.
* libvirt.spec.in (BuildRequires): Support gluster in spec file.
* src/conf/storage_conf.h (VIR_STORAGE_POOL_GLUSTER): New pool
type.
* src/conf/storage_conf.c (poolTypeInfo): Treat similar to
sheepdog and rbd.
(virStoragePoolDefFormat): Don't output target for gluster.
* src/storage/storage_backend_gluster.h: New file.
* src/storage/storage_backend_gluster.c: Likewise.
* po/POTFILES.in: Add new file.
* src/storage/storage_backend.c (backends): Register new type.
* src/Makefile.am (STORAGE_DRIVER_GLUSTER_SOURCES): Build new files.
* src/storage/storage_backend.h (_virStorageBackend): Documet
assumption.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-11-25 11:02:52 -07:00
..
parthelper.c
storage_backend_disk.c
storage_backend_disk.h
storage_backend_fs.c storage: always probe type with buffer 2013-11-06 17:31:51 -07:00
storage_backend_fs.h
storage_backend_gluster.c storage: initial support for linking with libgfapi 2013-11-25 11:02:52 -07:00
storage_backend_gluster.h storage: initial support for linking with libgfapi 2013-11-25 11:02:52 -07:00
storage_backend_iscsi.c Convert uuid to a string before printing it 2013-10-15 12:30:21 +02:00
storage_backend_iscsi.h
storage_backend_logical.c Remove (nearly) all use of getuid()/getgid() 2013-10-21 14:03:52 +01:00
storage_backend_logical.h
storage_backend_mpath.c storage: reduce number of stat calls 2013-11-06 17:17:08 -07:00
storage_backend_mpath.h
storage_backend_rbd.c maint: fix comma style issues: remaining code 2013-11-20 09:14:55 -07:00
storage_backend_rbd.h
storage_backend_scsi.c storage: Returns earlier if source adapter of the scsi pool is a HBA 2013-11-21 12:06:20 +08:00
storage_backend_scsi.h
storage_backend_sheepdog.c
storage_backend_sheepdog.h
storage_backend.c storage: initial support for linking with libgfapi 2013-11-25 11:02:52 -07:00
storage_backend.h storage: initial support for linking with libgfapi 2013-11-25 11:02:52 -07:00
storage_driver.c storage: use valid XML for awkward volume names 2013-11-21 17:29:47 -07:00
storage_driver.h