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

2012-09-20 Thread Kevin Wolf
Am 13.08.2012 09:54, schrieb Kevin Wolf: Am 12.08.2012 04:48, schrieb Kevin Shanahan: So qmp_change_blockdev uses bdrv_is_read_only() to check whether to try and open the backing file read only, which uses the -read_only member of struct BlockDriverState to decide whether to pass the

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

2012-08-13 Thread Kevin Wolf
Am 12.08.2012 04:48, schrieb Kevin Shanahan: So qmp_change_blockdev uses bdrv_is_read_only() to check whether to try and open the backing file read only, which uses the -read_only member of struct BlockDriverState to decide whether to pass the BDRV_O_RDRW flag to qmp_bdrv_open_encypted() and

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

2012-08-13 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 12.08.2012 04:48, schrieb Kevin Shanahan: So qmp_change_blockdev uses bdrv_is_read_only() to check whether to try and open the backing file read only, which uses the -read_only member of struct BlockDriverState to decide whether to pass the BDRV_O_RDRW

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

2012-08-13 Thread Kevin Wolf
Am 13.08.2012 13:57, schrieb Markus Armbruster: Kevin Wolf kw...@redhat.com writes: Am 12.08.2012 04:48, schrieb Kevin Shanahan: So qmp_change_blockdev uses bdrv_is_read_only() to check whether to try and open the backing file read only, which uses the -read_only member of struct

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 kw...@redhat.com writes: Am 02.08.2012 09:20, schrieb Kevin Shanahan: On Thu, Aug 02, 2012 at 02:49:52PM +0930, Kevin Shanahan wrote: On Thu, Aug 02, 2012 at

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

2012-08-09 Thread Kevin Wolf
Am 07.08.2012 10:47, schrieb Markus Armbruster: Kevin Wolf kw...@redhat.com writes: Am 02.08.2012 09:20, schrieb 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

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

2012-08-07 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 02.08.2012 09:20, schrieb 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

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

2012-08-07 Thread ronnie sahlberg
Since pretty much every cdrom drive use scsi today, shouldnt the readonly/writeable flag for MMC devices rather be done down in the hw/scsi* code rather than the generic block code? If/when/ever I get enough time I would like to port the writeable dvd+r emulation I wrote for STGT to qemu. In

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

2012-08-07 Thread Markus Armbruster
ronnie sahlberg ronniesahlb...@gmail.com writes: Since pretty much every cdrom drive use scsi today, shouldnt the readonly/writeable flag for MMC devices rather be done down in the hw/scsi* code rather than the generic block code? There are two separate things that can be read-only: device

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

2012-08-06 Thread Kevin Wolf
Am 02.08.2012 09:20, schrieb 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

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 qmp_change_blockdev does not

[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 kmsha...@disenchant.net --- Proposed fix for https://bugs.launchpad.net/qemu/+bug/1027525 diff -urN

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 directly but

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 mode when changing media.