qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] virtio-scsi vs. virtio-blk


From: ronnie sahlberg
Subject: Re: [Qemu-devel] virtio-scsi vs. virtio-blk
Date: Fri, 10 Aug 2012 22:24:56 +1000

On Fri, Aug 10, 2012 at 10:14 PM, Stefan Priebe - Profihost AG
<address@hidden> wrote:
> Am 10.08.2012 14:04, schrieb ronnie sahlberg:
>
>> On Fri, Aug 10, 2012 at 9:57 PM, Stefan Priebe - Profihost AG
>> <address@hidden> wrote:
>>>
>>> Am 10.08.2012 13:12, schrieb ronnie sahlberg:
>>>
>>>> You want discard to work?
>>>
>>>
>>> Yes
>>>
>>>
>>>> You are using qemu 1.0 ?
>>>
>>>
>>> actual qemu-kvm git
>>>
>>>
>>>> So you dont have the qemu support for scsi-generic passthrough to iscsi
>>>> devices.
>>>
>>>
>>> Why?
>>>
>>
>> scsi-generic passthrough I think was added for iscsi in 1.1
>> so in 1.0 your guest will talk scsi to qemu, and invoke the
>> scsi-emulation in qemu.
>> It then will call functions like 'bdrv_aio_discard()" in libiscsi
>> that will translate it back into a scsi command again and pass it to
>> the target.
>>
>> It still works, it just means you have a small degradation of
>> performance compared to if you could send the SCSI CDB straight
>> through to the iscsi target as you can in qemu 1.1
>> Very likely so small performance hit that you can not even measure it.
>
>
> which version are you talking about? I use qemu-kvm.git so this is upcomming
> 1.2 and i use libiscsi 1.5.0.

I dont know the kvm version numbers.

But you can check the file
block/iscsi.c for the version you use  for this :

  .bdrv_aio_discard = iscsi_aio_discard,

If it has bdrv_aio_discard then you have support for 'discard' when
using the scsi emulation. i.e.   -drive ...,if=scsi,...



#ifdef __linux__
    .bdrv_ioctl       = iscsi_ioctl,
    .bdrv_aio_ioctl   = iscsi_aio_ioctl,
#endif

If it has these two lines too, then you have scsi-passthrough and can
bypass the qemu scsi emulation.
One way to activate passthough is via scsi-generic:
    Example:
        -device lsi -device scsi-generic,drive=MyISCSI \
        -drive file=iscsi://10.1.1.125/iqn.ronnie.test/1,if=none,id=MyI


regards
ronnie sahlberg



reply via email to

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