From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5bpM-0000eI-4w for qemu-devel@nongnu.org; Wed, 25 May 2016 12:38:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5bpK-0003Fs-48 for qemu-devel@nongnu.org; Wed, 25 May 2016 12:38:35 -0400 Date: Wed, 25 May 2016 18:38:24 +0200 From: Kevin Wolf Message-ID: <20160525163824.GR4815@noname.redhat.com> References: <1464008051-6429-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464008051-6429-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/7] dma-helpers, scsi-block: use SG_IO for all I/O on scsi-block List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org Am 23.05.2016 um 14:54 hat Paolo Bonzini geschrieben: > scsi-block uses the block layer for reads and writes in order to avoid > allocating bounce buffers as big as the transferred data. We know how > to split a large transfer to multiple reads and writes, and thus we can > use scsi-disk.c's existing code to do I/O in multiple chunks (for non-s/g > SCSI hosts) or through the DMA helpers (for s/g SCSI hosts). > > Unfortunately, this has the side effect of eating the SCSI status except > in the very few cases where we can convert an errno code back to a SCSI > status. It puts a big wrench in persistent reservations support in the > guest, for example. > > Luckily, splitting a large transfer into multiple SBC commands is just as > easy, and this is what the last patch does. It takes the original CDB, > patches in a modified starting sector and sector count, and executes the > SCSI command through blk_aio_ioctl. It is also easy to pass a QEMUIOVector > to SG_IO, so that s/g SCSI hosts keep the performance. > > This rebases the patches on top of Eric's changes for byte-based > BlockBackend access and fixes a few bugs I knew about in the RFC. Thanks, applied patches 1 and 2 to the block branch (with the typo fix in patch 2). Kevin