From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nbrvy-000314-00 for qemu-devel@nongnu.org; Mon, 01 Feb 2010 03:47:02 -0500 Received: from [199.232.76.173] (port=47422 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nbrvx-0002zX-CB for qemu-devel@nongnu.org; Mon, 01 Feb 2010 03:47:01 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nbrvw-0005Aj-2t for qemu-devel@nongnu.org; Mon, 01 Feb 2010 03:47:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10144) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nbrvv-0005AP-N8 for qemu-devel@nongnu.org; Mon, 01 Feb 2010 03:46:59 -0500 Message-ID: <4B6694C8.4010703@redhat.com> Date: Mon, 01 Feb 2010 09:46:00 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <4B65B4B7.2030700@redhat.com> In-Reply-To: <4B65B4B7.2030700@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] block: Enable fall-back to read-only for backing file List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Naphtali Sprei Cc: qemu-devel@nongnu.org, Sheng Yang Am 31.01.2010 17:49, schrieb Naphtali Sprei: > There's a problem when trying to use an image file based on a read-only image file. > Before this patch, qemu fails to open the base image and stop. > With this patch, qemu tries to open the backing file with same permissions as the "top" file, > but if it fails, qemu tries to open it with read-only permissions. If succeeded it goes on. > > This fall-back works both for an image file based on a read-only file > and also for a read-only file opened with the snapshot attribute/mode (where the real file is the backing file > for the snapshot file). > > Is it better to always open the backing file with read-only mode ? this will be more consistent/predictable ? I would love to open them read-only unconditionally, but we can't. It would break the commit monitor command. I think the read-only fallback is appropriate for backing files. Kevin