[libvirt] Regression in createQemuImg()@storage_backend_fs.c of 0.6.4

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

 



Hi,

I've found a regression in using a backing store of a volume (qcow2)
in a pool (dir). The following code of 0.6.4 hits my system that works
with 0.6.3.

static int createQemuImg(virConnectPtr conn,
                         virStorageVolDefPtr vol,
                         virStorageVolDefPtr inputvol) {

(snip)

    const char *inputBackingPath = (inputvol ? inputvol->backingStore.path
                                             : NULL);

(snip)

        /* XXX: Not strictly required: qemu-img has an option a different
         * backing store, not really sure what use it serves though, and it
         * may cause issues with lvm. Untested essentially.
         */
        if (!inputBackingPath ||
            !STREQ(inputBackingPath, vol->backingStore.path)) {
            virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
                                  "%s", _("a different backing store can not "
                                          "be specified."));
            return -1;
        }


The inputBackingPath will be always NULL when it is called via
virStorageBackendFileSystemVolBuild(). (The third argument is
passed to that of createQemuImg as it is.)

static int
virStorageBackendFileSystemVolBuild(virConnectPtr conn,
                                    virStorageVolDefPtr vol) {
    return _virStorageBackendFileSystemVolBuild(conn, vol, NULL);
}


I've addressed the regression with the patch

-        if (!inputBackingPath ||
+        if (inputBackingPath &&

However, I'm not sure whether this fix satisfies the aim of
the original code. Any idea?

Thanks in advance,
  ozaki-r

--
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]