mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
storage: add network-dir as new storage volume type
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. * docs/formatstorage.html.in: Document it. * docs/schemasa/storagevol.rng (vol): Allow new value. * src/conf/storage_conf.c (virStorageVol): Use new value. * 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@redhat.com>
This commit is contained in:
@@ -291,7 +291,7 @@
|
||||
A storage volume will generally be either a file or a device
|
||||
node; <span class="since">since 1.2.0</span>, an optional
|
||||
output-only attribute <code>type</code> lists the actual type
|
||||
(file, block, dir, or network), which is also available
|
||||
(file, block, dir, network, or netdir), which is also available
|
||||
from <code>virStorageVolGetInfo()</code>. The storage volume
|
||||
XML format is available <span class="since">since 0.4.1</span>
|
||||
</p>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<value>block</value>
|
||||
<value>dir</value>
|
||||
<value>network</value>
|
||||
<value>netdir</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
|
||||
Reference in New Issue
Block a user