Received: from eggs.gnu.org ([2001:4830:134:3::10]:45993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgGEF-0003Gy-0d for qemu-devel@nongnu.org; Tue, 12 Nov 2013 10:50:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgGE8-0007nu-RX for qemu-devel@nongnu.org; Tue, 12 Nov 2013 10:50:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgGE8-0007e2-It for qemu-devel@nongnu.org; Tue, 12 Nov 2013 10:50:04 -0500 From: Paolo Bonzini Date: Tue, 12 Nov 2013 16:49:38 +0100 Message-Id: <1384271389-20716-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 00/11] block & scsi: write_zeroes support through the whole stack List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pl@kamp.de, stefanha@redhat.com This series fixes the implementation of WRITE SAME in the SCSI emulation layer. On top of this, it ensures that zero writes from the guest can be offloaded to the host device or filesystem if that's supported. This is a relatively important part of the thin provisioning feature, and builds on the unmap flag to write_zeroes, recently added by Peter Lieven. The feature works with iscsi, block device and filesystem targets. The block layer patches are 1-3 (adding prerequisites for using the feature in scsi-disk) and 7-11 (which support the feature on non-iscsi targets). Paolo Bonzini (11): block: generalize BlockLimits handling to cover bdrv_aio_discard too block: add flags to BlockRequest block: add bdrv_aio_write_zeroes scsi-disk: catch write protection errors in UNMAP scsi-disk: reject ANCHOR=1 for UNMAP and WRITE SAME commands scsi-disk: correctly implement WRITE SAME block: handle ENOTSUP from discard in generic code raw-posix: implement write_zeroes with MAY_UNMAP for files raw-posix: implement write_zeroes with MAY_UNMAP for block devices raw-posix: add support for write_zeroes on XFS and block devices qemu-iotests: 033 is fast block.c | 108 +++++++++++++++++------------ block/raw-aio.h | 3 +- block/raw-posix.c | 173 +++++++++++++++++++++++++++++++++++++++++++++-- hw/scsi/scsi-disk.c | 154 ++++++++++++++++++++++++++++++++++------- include/block/block.h | 4 ++ tests/qemu-iotests/group | 2 +- trace-events | 2 + 7 files changed, 369 insertions(+), 77 deletions(-) -- 1.8.4.2