qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Patch 0/14] builtin iscsi support


From: ronnie sahlberg
Subject: Re: [Qemu-devel] [Patch 0/14] builtin iscsi support
Date: Fri, 3 Dec 2010 22:50:39 +1100

On Fri, Dec 3, 2010 at 10:42 PM, Stefan Hajnoczi <address@hidden> wrote:
> On Fri, Dec 3, 2010 at 11:09 AM,  <address@hidden> wrote:
>> This series of pathces adds built in iscsi support to qemu.
>
> Christoph asked why block/iscsi.c exists and we don't have something
> like hw/iscsi-disk.c.  Any thoughts on "pass-through" SCSI support so
> CDBs from guest SCSI can be written straight to the iSCSI LUN?  Could
> we support this mode of operation?

That is very simple to add and uses an existing api i already use for
my own private sg3-utils branch.

./block.iscsi/scsi-command.c offers an api where you provide a "struct
scsi_task *" structure containing some basic data
and the cdb.
iscsi_scsi_command_async().

which later invokes the callback with status == SCSI_STATUS_GOOD in
which case the buffer from the device contains the data
or SCSI_STATUS_CHECK_CONDITON in which case that buffer contains the
sense blob instead.



So yes, there is already an api in the library that offers you to pass
scsi cdb/dataout/datain/response to the device.
Instrumenting this to be available to the virtual host as a
"passthrough" scsi device should be relatively simple as a second
step.



>
> I like block/iscsi.c because it allows any storage interface
> (including virtio and ide) to talk to an iSCSI LUN.  So I don't think
> it makes sense to throw away block/iscsi.c.  But the idea of a direct
> iSCSI pass-through might be interesting too.


That should be very easy to add once the foundation is added into qemu.
I would very much like to see bus=scsi make this layer a transparent
passthrough layer too, just like it is today for the special case
where the file specified matches "/dev/sg"

ronnie sahlberg



reply via email to

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