From patchwork Mon Jun 29 14:04:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 32954 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5TE5Y8B010683 for ; Mon, 29 Jun 2009 14:05:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755602AbZF2OEv (ORCPT ); Mon, 29 Jun 2009 10:04:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756262AbZF2OEv (ORCPT ); Mon, 29 Jun 2009 10:04:51 -0400 Received: from mx2.redhat.com ([66.187.237.31]:46118 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751906AbZF2OEu (ORCPT ); Mon, 29 Jun 2009 10:04:50 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5TE4rLZ001593; Mon, 29 Jun 2009 10:04:53 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5TE4qWJ014490; Mon, 29 Jun 2009 10:04:52 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5TE4oqO004383; Mon, 29 Jun 2009 10:04:51 -0400 Received: from localhost.localdomain (cleopatra.tlv.redhat.com [10.35.255.11]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 219CA250061; Mon, 29 Jun 2009 17:04:50 +0300 (IDT) From: Avi Kivity To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org Subject: [PATCH] Warn if a qcow (not qcow2) file is opened Date: Mon, 29 Jun 2009 17:04:49 +0300 Message-Id: <1246284289-25394-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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);