From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NjZRs-0008WP-Ds for qemu-devel@nongnu.org; Mon, 22 Feb 2010 09:39:48 -0500 Received: from [199.232.76.173] (port=33930 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NjZRs-0008WH-2c for qemu-devel@nongnu.org; Mon, 22 Feb 2010 09:39:48 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NjZRq-0004hn-UA for qemu-devel@nongnu.org; Mon, 22 Feb 2010 09:39:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21272) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NjZRq-0004hd-D3 for qemu-devel@nongnu.org; Mon, 22 Feb 2010 09:39:46 -0500 Message-ID: <4B829725.4050203@redhat.com> Date: Mon, 22 Feb 2010 16:39:33 +0200 From: Naphtali Sprei MIME-Version: 1.0 Subject: Re: [Qemu-devel] [BUG] Regression: readonly raw images no longer work References: <4B771C34.4040308@mail.berlios.de> In-Reply-To: <4B771C34.4040308@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Paolo Bonzini , QEMU Developers , Markus Armbruster Stefan Weil wrote: > This command used to work, but fails now: > > $ i386-softmmu/qemu -snapshot /dev/sda > qemu: could not open disk image /dev/sda: Permission denied > > $ ls -l /dev/sda > brw-rw-r-- 1 root disk 8, 0 13. Feb 08:55 /dev/sda > > The original file of a snapshot needs only read access, > but QEMU tries read/write access and fails. > > Variants of above command using -hda or -drive > also fail with the same error message. > > I did not test whether the regression affects other > kinds of images, too. Maybe only raw images trigger > no longer work. > > Regards > Stefan Weil > > > Sorry for the late reply, this is my fault. It will fail for any image format. It's already fixed with commit 4dca4b639cb20fee38f6eec0a391aecc0ad8848d : "block: more read-only changes, related to backing files" Now, since the /dev/sda is the backing-file, it's opened as read-only, no permission problem. Notice that if you try to commit your changes to the read-only disk (in monitor command), it will be silently ignored, no error or warning displayed. Should I add a warning/error printing ? Naphtali