[libvirt] [PATCH v2 4/5] Add 'nbd' as a valid filesystem driver type

Daniel P. Berrange berrange at redhat.com
Mon Apr 22 14:06:17 UTC 2013


From: "Daniel P. Berrange" <berrange at redhat.com>

The <filesystem> element can now accept a <driver type='nbd'/>
as an alternative to 'loop'. The benefit of NBD is support
for non-raw disk image formats.

Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 docs/formatdomain.html.in     | 5 +++--
 docs/schemas/domaincommon.rng | 1 +
 src/conf/domain_conf.c        | 3 ++-
 src/conf/domain_conf.h        | 1 +
 src/qemu/qemu_command.c       | 1 +
 5 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index a707cc8..2eca6d8 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1985,8 +1985,9 @@
             the <code>type</code> attribute selects the primary
             backend driver name, while the <code>format</code>
             attribute provides the format type. For example, LXC
-            supports a type of "loop", with a format of "raw". QEMU
-            supports a type of "path" or "handle", but no formats.
+            supports a type of "loop", with a format of "raw" or
+            "nbd" with any format. QEMU supports a type of "path"
+            or "handle", but no formats.
           </li>
         </ul>
       </dd>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 206757f..33fac33 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1659,6 +1659,7 @@
             <value>path</value>
             <value>handle</value>
             <value>loop</value>
+            <value>nbd</value>
           </choice>
         </attribute>
       </optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 582308b..51ad42c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -337,7 +337,8 @@ VIR_ENUM_IMPL(virDomainFSDriverType, VIR_DOMAIN_FS_DRIVER_TYPE_LAST,
               "default",
               "path",
               "handle",
-              "loop")
+              "loop",
+              "nbd")
 
 VIR_ENUM_IMPL(virDomainFSAccessMode, VIR_DOMAIN_FS_ACCESSMODE_LAST,
               "passthrough",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index a65aabc..3338ddf 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -768,6 +768,7 @@ enum virDomainFSDriverType {
     VIR_DOMAIN_FS_DRIVER_TYPE_PATH,
     VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE,
     VIR_DOMAIN_FS_DRIVER_TYPE_LOOP,
+    VIR_DOMAIN_FS_DRIVER_TYPE_NBD,
 
     VIR_DOMAIN_FS_DRIVER_TYPE_LAST
 };
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 05c2a41..148e24e 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -131,6 +131,7 @@ VIR_ENUM_IMPL(qemuDomainFSDriver, VIR_DOMAIN_FS_DRIVER_TYPE_LAST,
               "local",
               "local",
               "handle",
+              NULL,
               NULL);
 
 
-- 
1.7.11.7




More information about the libvir-list mailing list