From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxLZd-0007Dp-QH for qemu-devel@nongnu.org; Mon, 12 Oct 2009 10:08:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxLZY-0007BW-RI for qemu-devel@nongnu.org; Mon, 12 Oct 2009 10:08:29 -0400 Received: from [199.232.76.173] (port=46380 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxLZY-0007BT-Mv for qemu-devel@nongnu.org; Mon, 12 Oct 2009 10:08:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28099) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxLZY-0003nX-1O for qemu-devel@nongnu.org; Mon, 12 Oct 2009 10:08:24 -0400 Message-ID: <4AD33813.6090006@redhat.com> Date: Mon, 12 Oct 2009 16:07:15 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Add readonly flag to -drive command References: <4AD32550.8040901@redhat.com> <4AD32DF6.4050100@redhat.com> <20091012135032.GA13560@shareable.org> In-Reply-To: <20091012135032.GA13560@shareable.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: Naphtali Sprei , qemu-devel@nongnu.org Am 12.10.2009 15:50, schrieb Jamie Lokier: > Right now there is already a 'readonly' flag called 'chmod -r image', > because QEMU opens a file read-only if it can't open it writable, so > it's not a new case. Just moving it from the filesystem into QEMU. Right, but I'm not sure how well it is tested. I think, when moving it into qemu we should take the opportunity to do it right. If everything works right now, the right description of it is probably "pure luck". And I assume you didn't do stupid things like savevm on a read-only image which we still should be able to handle. > When opened read-only, it would be better for the block drivers to > return an error themselves, instead of trying to write and (hopefully) > getting a host OS error. For simple read/write operations, the generic block layer is doing the check already. Kevin