From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeVi8-0002QK-1C for qemu-devel@nongnu.org; Tue, 03 Mar 2009 09:35:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeVi3-0002MI-Tg for qemu-devel@nongnu.org; Tue, 03 Mar 2009 09:35:05 -0500 Received: from [199.232.76.173] (port=42423 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeVi2-0002Ld-Cr for qemu-devel@nongnu.org; Tue, 03 Mar 2009 09:35:02 -0500 Received: from mx2.redhat.com ([66.187.237.31]:57252) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LeVi1-0007jc-Lq for qemu-devel@nongnu.org; Tue, 03 Mar 2009 09:35:02 -0500 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 n23EXuD4003972 for ; Tue, 3 Mar 2009 09:33:56 -0500 From: Uri Lublin Date: Tue, 3 Mar 2009 16:33:51 +0200 Message-Id: <1236090833-15538-1-git-send-email-uril@redhat.com> Subject: [Qemu-devel] [PATCH 0/2] Introducing qcow2 extensions + keep backing file format Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Uri Lublin Qcow2 extensions are build of magic (id) len (in bytes) and data. They reside between the end of the header and the filename. We can keep the backing file format in a such a qcow2 extension, to 1. Provide a way to know the backing file format without probing it (setting the format at creation time). 2. Enable using qcow2 format over host block devices. (only if the user specifically asks for it, by providing the format at creation time). I've added bdrv_create2 and drv->bdrv_create2 (implemented only by block-qcow2 currently) to pass the backing-format to create. Based on a work done by Shahar Frank. Also fixes a security flaw found by Daniel P. Berrange on [1] which summarizes: "Autoprobing: just say no." [1] http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg01083.html Changes from V4: old commented code deleted. fix temporary snapshot (e.g. -snapshot) support. Signed-off-by: Uri Lublin