[Qemu-devel] [PATCH] blockdev: preserve readonly and snapshot states across media changes

2012-09-20 Thread Kevin Shanahan
ed-off-by: Kevin Shanahan --- blockdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blockdev.c b/blockdev.c index 8669142..84f9a2e 100644 --- a/blockdev.c +++ b/blockdev.c @@ -526,6 +526,8 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) if_nam

Re: [Qemu-devel] [PATCH] block: Set cdrom device read only flag

2012-08-11 Thread Kevin Shanahan
On Thu, Aug 09, 2012 at 10:42:51AM +0200, Kevin Wolf wrote: > Am 07.08.2012 10:47, schrieb Markus Armbruster: > > Kevin Wolf writes: > > > >> Am 02.08.2012 09:20, schrieb Kevin Shanahan: > >>> On Thu, Aug 02, 2012 at 02:49:52PM +0930, Kevin Shanahan wrote:

Re: [Qemu-devel] [PATCH] block: Set cdrom device read only flag

2012-08-02 Thread Kevin Shanahan
On Thu, Aug 02, 2012 at 02:49:52PM +0930, Kevin Shanahan wrote: > On Thu, Aug 02, 2012 at 11:46:13AM +0930, Kevin Shanahan wrote: > > On Thu, Aug 02, 2012 at 11:02:42AM +0930, Kevin Shanahan wrote: > > > Set the block driver read_only flag for cdrom devices so that > > &g

Re: [Qemu-devel] [PATCH] block: Set cdrom device read only flag

2012-08-01 Thread Kevin Shanahan
On Thu, Aug 02, 2012 at 11:46:13AM +0930, Kevin Shanahan wrote: > On Thu, Aug 02, 2012 at 11:02:42AM +0930, Kevin Shanahan wrote: > > Set the block driver read_only flag for cdrom devices so that > > qmp_change_blockdev does not attempt to open cdrom files in read-write > &g

Re: [Qemu-devel] [PATCH] block: Set cdrom device read only flag

2012-08-01 Thread Kevin Shanahan
On Thu, Aug 02, 2012 at 11:02:42AM +0930, Kevin Shanahan wrote: > Set the block driver read_only flag for cdrom devices so that > qmp_change_blockdev does not attempt to open cdrom files in read-write > mode when changing media. Hrm, this fixes my simple test case using the kvm monitor

[Qemu-devel] [PATCH] block: Set cdrom device read only flag

2012-08-01 Thread Kevin Shanahan
Set the block driver read_only flag for cdrom devices so that qmp_change_blockdev does not attempt to open cdrom files in read-write mode when changing media. Signed-off-by: Kevin Shanahan --- Proposed fix for https://bugs.launchpad.net/qemu/+bug/1027525 diff -urN qemu-kvm-1.1.1.orig/blockdev.c

[Qemu-devel] [Bug 1027525] Re: Unable to insert cd media located on ro nfs mount

2012-08-01 Thread Kevin Shanahan
Of course, I mean "qmp_change_blockdev tries to open the device read- write". -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1027525 Title: Unable to insert cd media located on ro nfs mount Status

[Qemu-devel] [Bug 1027525] Re: Unable to insert cd media located on ro nfs mount

2012-08-01 Thread Kevin Shanahan
Looks like the read_only flag in the block device state never gets set. This needs to be set otherwise qmp_change_blockdev tries to open the device read only. This patch works for me. ** Patch added: "Proposed fix" https://bugs.launchpad.net/qemu/+bug/1027525/+attachment/3245422/+files/cdroms-

[Qemu-devel] [Bug 1027525] Re: Unable to insert cd media located on ro nfs mount

2012-07-21 Thread Kevin Shanahan
I ran strace while running the test and I see few times: open("/srv/kvm/iso/ubuntu-12.04-server-amd64.iso", O_RDONLY|O_NONBLOCK) = 12 fstat(12, {st_mode=S_IFREG|0666, st_size=717533184, ...}) = 0 close(12) But the final open looks like this: open("/srv/kvm/iso/ubuntu-12.04-server-amd64.iso", O_R

[Qemu-devel] [Bug 1027525] [NEW] Unable to insert cd media located on ro nfs mount

2012-07-21 Thread Kevin Shanahan
Public bug reported: When issuing a "change" command via the monitor, qemu is unable to open the iso file if it is mounted on a read-only nfs share. If I mount read- write (and make sure the file is writable by the qemu process), then the change command succeeds. Note that this doesn't affect medi