qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [BUG] Regression: readonly raw images no longer wor


From: Markus Armbruster
Subject: Re: [Qemu-devel] Re: [BUG] Regression: readonly raw images no longer work
Date: Mon, 15 Feb 2010 09:01:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> 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 <address@hidden>  2010-01-17 15:48:15
> Committer: Anthony Liguori <address@hidden>  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 <address@hidden>
>     Signed-off-by: Anthony Liguori <address@hidden>
>
> ... 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.

Maybe drive_enable_snapshot() should set readonly in opts as well.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]