From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLHTf-0007PG-Vp for qemu-devel@nongnu.org; Mon, 29 Jun 2009 10:05:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLHTb-0007HO-06 for qemu-devel@nongnu.org; Mon, 29 Jun 2009 10:04:59 -0400 Received: from [199.232.76.173] (port=51211 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLHTa-0007Gz-QZ for qemu-devel@nongnu.org; Mon, 29 Jun 2009 10:04:54 -0400 Received: from mx2.redhat.com ([66.187.237.31]:54280) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MLHTa-0004sN-2e for qemu-devel@nongnu.org; Mon, 29 Jun 2009 10:04:54 -0400 From: Avi Kivity Date: Mon, 29 Jun 2009 17:04:49 +0300 Message-Id: <1246284289-25394-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH] Warn if a qcow (not qcow2) file is opened List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org 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 --- 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