qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Two trivial patches for iSCSI and blank DVDs
@ 2012-08-17  2:36 Ronnie Sahlberg
  2012-08-17  2:36 ` [Qemu-devel] [PATCH 1/2] ISCSI: Set number of blocks to 0 for blank CDROM devices Ronnie Sahlberg
  2012-08-17  2:36 ` [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks Ronnie Sahlberg
  0 siblings, 2 replies; 15+ messages in thread
From: Ronnie Sahlberg @ 2012-08-17  2:36 UTC (permalink / raw)
  To: kwolf, qemu-devel, pbonzini

Kevin, List, Paolo

Please find two trivial patches to the iscsi block driver.

1, If the LUN contains a blank disk then the readcapacity10 data will
contain a ReturnedLogicalBlockAddress of 0. For this case this does not mean that the device contains one readable block and can be read from.
This is a special case for a blank disk that contains no readable blocks at all. This change makes bdrv_getlength()/iscsi_getlength() now rerurn a size of 0  for iSCSI LUNs that contain a blank disk.

2, If the iSCSI LUN contains a blank disk then we can not read or write to it using bdrv_*() functions since there is no bdrv api for writeable mmc devices.
For this case with a blank disk force the use of scsi-generic just like 
we do for tape and mediachanger devices.
This allows the guest to talk directly to the target LUN and write to/burn the disk.


I have confirmed that 

  dvdrecord -dao -ignsize -overburn dev=/dev/sg1 <some-file>.iso

works from a qemu guest to burn an iSCSI cdrom with these patches.

regards
ronnie sahlberg

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-08-19 10:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-17  2:36 [Qemu-devel] [PATCH] Two trivial patches for iSCSI and blank DVDs Ronnie Sahlberg
2012-08-17  2:36 ` [Qemu-devel] [PATCH 1/2] ISCSI: Set number of blocks to 0 for blank CDROM devices Ronnie Sahlberg
2012-08-18 21:57   ` Paolo Bonzini
2012-08-18 22:06     ` ronnie sahlberg
2012-08-17  2:36 ` [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks Ronnie Sahlberg
2012-08-18 14:23   ` Blue Swirl
2012-08-18 21:58   ` Paolo Bonzini
2012-08-18 22:02     ` ronnie sahlberg
2012-08-18 22:04       ` ronnie sahlberg
2012-08-18 22:16       ` Paolo Bonzini
2012-08-18 22:19         ` ronnie sahlberg
2012-08-18 22:41           ` Paolo Bonzini
2012-08-18 22:20       ` Paolo Bonzini
2012-08-18 23:44         ` ronnie sahlberg
2012-08-19 10:16           ` Paolo Bonzini

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).