]> xenbits.xensource.com Git - libvirt.git/commitdiff
Allow rbd backing stores
authorPeter Feiner <peter@gridcentric.ca>
Wed, 8 Aug 2012 21:02:24 +0000 (17:02 -0400)
committerEric Blake <eblake@redhat.com>
Wed, 8 Aug 2012 21:57:14 +0000 (15:57 -0600)
Prevents libvirt from treating RBD backing stores as files. Without this
patch, creating a domain with a qcow2 overlay on an RBD would fail.

This patch essentially extends 9c7c4a4fc533598e59e9a0038ec783e61a38e664,
which allows nbd backing stores, to allow rbd backing stores.

src/util/storage_file.c

index f38aa8e1aa8d7a6ee83da9e47a0220be33eb2f4b..101518a7df31c5b636e9923b159003a58f83f7fb 100644 (file)
@@ -589,8 +589,8 @@ virStorageFileMatchesVersion(int format,
 static bool
 virBackingStoreIsFile(const char *backing)
 {
-    /* Backing store is a network block device */
-    if (STRPREFIX(backing, "nbd:"))
+    /* Backing store is a network block device or Rados block device */
+    if (STRPREFIX(backing, "nbd:") || STRPREFIX(backing, "rbd:"))
         return false;
     return true;
 }