[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, experimental, updated. debian/0.10.2-4-3-g99d7ed7

Guido Günther agx at sigxcpu.org
Mon Oct 22 17:21:07 UTC 2012


The following commit has been merged in the experimental branch:
commit aa51fc1eade9f3999d18a424096375830409d0aa
Author: Guido Günther <agx at sigxcpu.org>
Date:   Wed Oct 17 07:35:25 2012 +0200

    storage: lvm: lvcreate fails with allocation=0, don't do that
    
    Thanks: Cole Robinson

diff --git a/debian/patches/series b/debian/patches/series
index ab4cb22..522edfb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ Reduce-udevadm-settle-timeout-to-10-seconds.patch
 debian/Debianize-systemd-service-files.patch
 Allow-xen-toolstack-to-find-it-s-binaries.patch
 Properly-parse-unsigned-long-long.patch
+storage-lvm-lvcreate-fails-with-allocation-0-don-t-d.patch
diff --git a/debian/patches/storage-lvm-lvcreate-fails-with-allocation-0-don-t-d.patch b/debian/patches/storage-lvm-lvcreate-fails-with-allocation-0-don-t-d.patch
new file mode 100644
index 0000000..aca6e87
--- /dev/null
+++ b/debian/patches/storage-lvm-lvcreate-fails-with-allocation-0-don-t-d.patch
@@ -0,0 +1,34 @@
+From: Cole Robinson <crobinso at redhat.com>
+Date: Tue, 16 Oct 2012 20:30:23 -0400
+Subject: storage: lvm: lvcreate fails with allocation=0, don't do that
+
+On F17 at least, this command fails:
+
+$ sudo /usr/sbin/lvcreate --name sparsetest -L 0K --virtualsize 16384K vgvirt
+  Unable to create new logical volume with no extents
+
+Which is unfortunate since allocation=0 is what virt-manager tries to use
+by default.
+
+Rather than telling the user 'don't do that', let's just give them the
+smallest allocation possible if alloc=0 is requested.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=866481
+---
+ src/storage/storage_backend_logical.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
+index a9d785c..2b37f07 100644
+--- a/src/storage/storage_backend_logical.c
++++ b/src/storage/storage_backend_logical.c
+@@ -724,7 +724,8 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
+                                NULL);
+     virCommandAddArg(cmd, "-L");
+     if (vol->capacity != vol->allocation) {
+-        virCommandAddArgFormat(cmd, "%lluK", VIR_DIV_UP(vol->allocation, 1024));
++        virCommandAddArgFormat(cmd, "%lluK",
++                VIR_DIV_UP(vol->allocation ? vol->allocation : 1, 1024));
+         virCommandAddArg(cmd, "--virtualsize");
+     }
+     virCommandAddArgFormat(cmd, "%lluK", VIR_DIV_UP(vol->capacity, 1024));

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list