[PATCH] Warn if a qcow (not qcow2) file is opened

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

 



The qcow block driver format is no longer maintained and likely contains
serious data corruptors.  Urge users to stay away for it, and advertise
the new and improved replacement.

Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 block/qcow.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/block/qcow.c b/block/qcow.c
index 55a68a6..2aef6a6 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -101,6 +101,11 @@ static int qcow_open(BlockDriverState *bs, const char *filename, int flags)
         return ret;
     if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header))
         goto fail;
+
+    fprintf(stderr,
+            "WARNING: the qcow file format is no longer supported.\n"
+            "         Please convert your images to qcow2.\n");
+
     be32_to_cpus(&header.magic);
     be32_to_cpus(&header.version);
     be64_to_cpus(&header.backing_file_offset);
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux