Re: [PATCHv4 4/8] storage: add network-dir as new storage volume type

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

 



On Mon, Nov 25, 2013 at 10:42:30AM +0000, Daniel P. Berrange wrote:
> On Fri, Nov 22, 2013 at 08:20:26PM -0700, Eric Blake wrote:
> > In the 'directory' and 'netfs' storage pools, a user can see
> > both 'file' and 'dir' storage volume types, to know when they
> > can descend into a subdirectory.  But in a network-based storage
> > pool, such as the upcoming 'gluster' pool, we use 'network'
> > instead of 'file', and did not have any counterpart for a
> > directory until this patch.  Adding a new volume type
> > 'network-dir' is better than reusing 'dir', because it makes
> > it clear that the only way to access 'network' volumes within
> > that container is through the network mounting (leaving 'dir'
> > for something accessible in the local file system).
> > 
> > * include/libvirt/libvirt.h.in (virStorageVolType): Expand enum.
> > * src/qemu/qemu_command.c (qemuBuildVolumeString): Fix client.
> > * src/qemu/qemu_conf.c (qemuTranslateDiskSourcePool): Likewise.
> > * tools/virsh-volume.c (vshVolumeTypeToString): Likewise.
> > * src/storage/storage_backend_fs.c
> > (virStorageBackendFileSystemVolDelete): Likewise.
> > 
> > Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> > ---
> >  include/libvirt/libvirt.h.in     | 2 ++
> >  src/conf/storage_conf.c          | 2 +-
> >  src/qemu/qemu_command.c          | 6 ++++--
> >  src/qemu/qemu_conf.c             | 4 +++-
> >  src/storage/storage_backend_fs.c | 5 +++--
> >  tools/virsh-volume.c             | 5 ++++-
> >  6 files changed, 17 insertions(+), 7 deletions(-)
> > 
> > diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> > index 146a59b..5e8cba6 100644
> > --- a/include/libvirt/libvirt.h.in
> > +++ b/include/libvirt/libvirt.h.in
> > @@ -2951,6 +2951,8 @@ typedef enum {
> >      VIR_STORAGE_VOL_BLOCK = 1,    /* Block based volumes */
> >      VIR_STORAGE_VOL_DIR = 2,      /* Directory-passthrough based volume */
> >      VIR_STORAGE_VOL_NETWORK = 3,  /* Network volumes like RBD (RADOS Block Device) */
> > +    VIR_STORAGE_VOL_NETWORK_DIR = 4, /* Network accessible directory that can
> > +                                      * contain other network volumes */
> > 
> >  #ifdef VIR_ENUM_SENTINELS
> >      VIR_STORAGE_VOL_LAST
> > diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> > index add2ae1..493a874 100644
> > --- a/src/conf/storage_conf.c
> > +++ b/src/conf/storage_conf.c
> > @@ -53,7 +53,7 @@
> > 
> >  VIR_ENUM_IMPL(virStorageVol,
> >                VIR_STORAGE_VOL_LAST,
> > -              "file", "block", "dir", "network")
> > +              "file", "block", "dir", "network", "network-dir")
> 
> I've got to say I really don't like this naming but not
> got a better suggestion yet.

Could we at least shorten it to 'netdir' ? 


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]