From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzoGy-0002pb-0n for qemu-devel@nongnu.org; Fri, 10 Aug 2012 08:25:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzoGv-00062u-Of for qemu-devel@nongnu.org; Fri, 10 Aug 2012 08:24:59 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:57340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzoGv-00062n-JF for qemu-devel@nongnu.org; Fri, 10 Aug 2012 08:24:57 -0400 Received: by obbta14 with SMTP id ta14so2043074obb.4 for ; Fri, 10 Aug 2012 05:24:57 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5024FB17.7060706@profihost.ag> References: <502283FA.2080506@profihost.ag> <5022912B.2000607@redhat.com> <50235527.4090804@profihost.ag> <50236059.7060801@redhat.com> <4A799203-5BFF-4DE9-9B85-459096EBEC22@profihost.ag> <50236484.2090702@redhat.com> <502369C7.7000300@profihost.ag> <50238E2A.1050203@profihost.ag> <5024D2E7.40700@profihost.ag> <5024E06A.4070603@redhat.com> <5024E232.5020706@profihost.ag> <5024E2CB.2050208@redhat.com> <5024F73E.2060609@profihost.ag> <5024FB17.7060706@profihost.ag> Date: Fri, 10 Aug 2012 22:24:56 +1000 Message-ID: From: ronnie sahlberg Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] virtio-scsi vs. virtio-blk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Priebe - Profihost AG Cc: Paolo Bonzini , qemu-devel , Stefan Hajnoczi On Fri, Aug 10, 2012 at 10:14 PM, Stefan Priebe - Profihost AG wrote: > Am 10.08.2012 14:04, schrieb ronnie sahlberg: > >> On Fri, Aug 10, 2012 at 9:57 PM, Stefan Priebe - Profihost AG >> 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