From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnqyZ-00048k-0j for qemu-devel@nongnu.org; Tue, 03 Dec 2013 09:29:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnqyS-0001gg-1l for qemu-devel@nongnu.org; Tue, 03 Dec 2013 09:29:22 -0500 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:62003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnqyR-0001ga-OI for qemu-devel@nongnu.org; Tue, 03 Dec 2013 09:29:15 -0500 Received: by mail-wi0-f171.google.com with SMTP id ca18so6627655wib.16 for ; Tue, 03 Dec 2013 06:29:14 -0800 (PST) Date: Tue, 3 Dec 2013 15:29:08 +0100 From: Stefan Hajnoczi Message-ID: <20131203142908.GF24604@stefanha-thinkpad.muc.redhat.com> References: <1385124001-3576-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1385124001-3576-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 00/19] block & scsi: write_zeroes support through the whole stack List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, stefanha@redhat.com, pl@kamp.de, qemu-devel@nongnu.org, ronniesahlberg@gmail.com On Fri, Nov 22, 2013 at 01:39:42PM +0100, Paolo Bonzini wrote: > 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. > > v2->v3 > Drop "block/iscsi: use UNMAP to write zeroes if LBPRZ=1" [Peter] > > Patches 3/4: change tracepoint flags to %#x [Stefan] > > Patch 6: clean up conditionals for misaligned num [Stefan] > Patch 6: fix freeing of bounce buffer [Peter] > > Patch 7: fix bdi->cluster_size for vhdx [Stefan] > > Patch 8: do not check bs->backing_hd to set > bdi->unallocated_blocks_are_zero [Peter] > > Patch 19: use qemu_blockalign/qemu_vfree [Stefan] > > v1->v2 > I cleaned up the series, putting all the block layer changes > together and all the SCSI changes at the end. > > qcow2 and iscsi are now better covered, which caused the > introduction of patches 6-11. I also downloaded the latest > which contributed some changes in patches 10-11. It turns > out we were too cautious in treating LBPRZ as advisory when > using the UNMAP command. On the other hand, the API we > introduced is useful for qcow2/qed/vmdk WRITE SAME, so no > damage done. > > > Paolo Bonzini (17): > block: generalize BlockLimits handling to cover bdrv_aio_discard too > block: add flags to BlockRequest > block: add flags argument to bdrv_co_write_zeroes tracepoint > block: add bdrv_aio_write_zeroes > block: handle ENOTSUP from discard in generic code > block: make bdrv_co_do_write_zeroes stricter in producing aligned > requests > vpc, vhdx: add get_info > block drivers: add discard/write_zeroes properties to bdrv_get_info > implementation > block drivers: expose requirement for write same alignment from > formats > block/iscsi: check WRITE SAME support differently depending on > MAY_UNMAP > 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 > 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 > > Peter Lieven (2): > block/iscsi: remove .bdrv_has_zero_init > block/iscsi: updated copyright > > block.c | 145 +++++++++++++++++++++++---------------- > block/iscsi.c | 27 +++++--- > block/qcow2.c | 3 + > block/qed.c | 3 + > block/raw-aio.h | 3 +- > block/raw-posix.c | 175 ++++++++++++++++++++++++++++++++++++++++++++--- > block/vdi.c | 1 + > block/vhdx.c | 13 ++++ > block/vmdk.c | 4 ++ > block/vpc.c | 15 ++++ > hw/scsi/scsi-disk.c | 154 ++++++++++++++++++++++++++++++++++------- > include/block/block.h | 4 ++ > tests/qemu-iotests/group | 2 +- > trace-events | 4 +- > 14 files changed, 452 insertions(+), 101 deletions(-) Some of it is SCSI but I've applied the whole series. Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan