[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 0/7] dma-helpers, scsi-block: use SG_IO for a
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH v2 0/7] dma-helpers, scsi-block: use SG_IO for all I/O on scsi-block |
Date: |
Wed, 25 May 2016 18:38:24 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
- Re: [Qemu-block] [Qemu-devel] [PATCH 4/7] scsi-disk: introduce dma_readv and dma_writev, (continued)
Re: [Qemu-block] [PATCH v2 0/7] dma-helpers, scsi-block: use SG_IO for all I/O on scsi-block,
Kevin Wolf <=