qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [BUG] Regression: readonly raw images no longer work
Date: Sat, 13 Feb 2010 23:38:12 +0100	[thread overview]
Message-ID: <hl79kk$p1q$1@ger.gmane.org> (raw)
In-Reply-To: <4B771C34.4040308@mail.berlios.de>

On 02/13/2010 10:40 PM, 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.

Caused by

commit 03cbdac7efc20994d0a87015e24e835d0139df7b
Author: Naphtali Sprei <nsprei@redhat.com>  2010-01-17 15:48:15
Committer: Anthony Liguori <aliguori@us.ibm.com>  2010-01-20 15:25:22
Follows: v0.12.0-rc0

     Disable fall-back to read-only when cannot open drive's file for
     read-write

     Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
     Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

... because before that it was working like this:

open("/dev/sda", O_RDWR|O_SYNC|O_CLOEXEC) = -1 EACCES
open("/dev/sda", O_RDONLY|O_SYNC|O_CLOEXEC) = 10

BTW, because of other bugs in the middle of the history you need a 
command line "-hda /dev/null -drive file=/dev/sda,snapshot=on" to bisect it.

Paolo

  reply	other threads:[~2010-02-13 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-13 21:40 [Qemu-devel] [BUG] Regression: readonly raw images no longer work Stefan Weil
2010-02-13 22:38 ` Paolo Bonzini [this message]
2010-02-15  8:01   ` [Qemu-devel] " Markus Armbruster
2010-02-22 14:39 ` [Qemu-devel] " Naphtali Sprei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hl79kk$p1q$1@ger.gmane.org' \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).