Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-19 Thread Paolo Bonzini
Il 19/08/2012 01:44, ronnie sahlberg ha scritto: > format=raw works ! > > That then begs the question if would it be possible to force > format=raw always for iscsi devices? > > A iscsi device as far as I can see would always just be a raw block > device and there would never be a "header" on suc

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread ronnie sahlberg
On Sun, Aug 19, 2012 at 8:20 AM, Paolo Bonzini wrote: > Il 19/08/2012 00:02, ronnie sahlberg ha scritto: >> On Sun, Aug 19, 2012 at 7:58 AM, Paolo Bonzini wrote: >>> Il 17/08/2012 04:36, Ronnie Sahlberg ha scritto: There is no bdrv_* API for the commands for burning a blank MMC disk so

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread Paolo Bonzini
Il 19/08/2012 00:19, ronnie sahlberg ha scritto: >> > Yeah, I think in this case find_image_format should just use raw. > Ok, so that is basically what the patch does. It forces bs->sg==true > so that we pick "raw" right there instead of trying to read from the > device. > > So you are happy with

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread Paolo Bonzini
Il 19/08/2012 00:02, ronnie sahlberg ha scritto: > On Sun, Aug 19, 2012 at 7:58 AM, Paolo Bonzini wrote: >> Il 17/08/2012 04:36, Ronnie Sahlberg ha scritto: >>> There is no bdrv_* API for the commands for burning a blank MMC disk >>> so when iSCSI LUNs are specified and the LUN is a MMC device wit

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread ronnie sahlberg
On Sun, Aug 19, 2012 at 8:16 AM, Paolo Bonzini wrote: > Il 19/08/2012 00:02, ronnie sahlberg ha scritto: >> Neither of them work, basically because in >> block.c:find_image_format() >> >> if bs->sg is not set in >> >> if (bs->sg || !bdrv_is_inserted(bs)) { >> >> then we continue to >> >> ret =

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread Paolo Bonzini
Il 19/08/2012 00:02, ronnie sahlberg ha scritto: > Neither of them work, basically because in > block.c:find_image_format() > > if bs->sg is not set in > > if (bs->sg || !bdrv_is_inserted(bs)) { > > then we continue to > > ret = bdrv_pread(bs, 0, buf, sizeof(buf)); > > which fails with an e

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread ronnie sahlberg
Ah, This patch only affects the case when there is a blank / empty disk loaded. It has no effect on when real *.iso images are loaded and the disk contains data. The use case to be able to "burn" to an iscsi cdrom is probably not very urgent, so maybe it is best to delay this until post 1.2 reg

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread ronnie sahlberg
On Sun, Aug 19, 2012 at 7:58 AM, Paolo Bonzini wrote: > Il 17/08/2012 04:36, Ronnie Sahlberg ha scritto: >> There is no bdrv_* API for the commands for burning a blank MMC disk >> so when iSCSI LUNs are specified and the LUN is a MMC device with >> 0 available blocks. This is a blank disk so force

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread Paolo Bonzini
Il 17/08/2012 04:36, Ronnie Sahlberg ha scritto: > There is no bdrv_* API for the commands for burning a blank MMC disk > so when iSCSI LUNs are specified and the LUN is a MMC device with > 0 available blocks. This is a blank disk so force scsi generic. > > This allows the guest to talk directly t

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread Blue Swirl
On Fri, Aug 17, 2012 at 2:36 AM, Ronnie Sahlberg wrote: > There is no bdrv_* API for the commands for burning a blank MMC disk > so when iSCSI LUNs are specified and the LUN is a MMC device with > 0 available blocks. This is a blank disk so force scsi generic. > > This allows the guest to talk dir

[Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-16 Thread Ronnie Sahlberg
There is no bdrv_* API for the commands for burning a blank MMC disk so when iSCSI LUNs are specified and the LUN is a MMC device with 0 available blocks. This is a blank disk so force scsi generic. This allows the guest to talk directly to the target to burn data on the disk. Signed-off-by: Ronn