qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pl@kamp.de, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH v2 00/20] block & scsi: write_zeroes support through the whole stack
Date: Tue, 19 Nov 2013 18:07:23 +0100	[thread overview]
Message-ID: <1384880863-10434-1-git-send-email-pbonzini@redhat.com> (raw)

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.

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.

        Patch 3 is also new.

Paolo Bonzini (18):
  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
  block/iscsi: use UNMAP to write zeroes if LBPRZ=1
  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                  | 140 ++++++++++++++++++++-----------------
 block/iscsi.c            |  32 ++++++---
 block/qcow2.c            |   3 +
 block/qed.c              |   3 +
 block/raw-aio.h          |   3 +-
 block/raw-posix.c        | 175 ++++++++++++++++++++++++++++++++++++++++++++---
 block/vdi.c              |   3 +
 block/vhdx.c             |  14 ++++
 block/vmdk.c             |   4 ++
 block/vpc.c              |  16 +++++
 hw/scsi/scsi-disk.c      | 154 ++++++++++++++++++++++++++++++++++-------
 include/block/block.h    |   4 ++
 tests/qemu-iotests/group |   2 +-
 trace-events             |   4 +-
 14 files changed, 452 insertions(+), 105 deletions(-)

-- 
1.8.4.2

             reply	other threads:[~2013-11-19 17:08 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19 17:07 Paolo Bonzini [this message]
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 01/20] block: generalize BlockLimits handling to cover bdrv_aio_discard too Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 02/20] block: add flags to BlockRequest Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 03/20] block: add flags argument to bdrv_co_write_zeroes tracepoint Paolo Bonzini
2013-11-20  9:59   ` Stefan Hajnoczi
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 04/20] block: add bdrv_aio_write_zeroes Paolo Bonzini
2013-11-20 10:02   ` Stefan Hajnoczi
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 05/20] block: handle ENOTSUP from discard in generic code Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 06/20] block: make bdrv_co_do_write_zeroes stricter in producing aligned requests Paolo Bonzini
2013-11-20 10:22   ` Stefan Hajnoczi
2013-11-20 11:01     ` Paolo Bonzini
2013-11-20 14:29       ` Stefan Hajnoczi
2013-11-21 11:30   ` Peter Lieven
2013-11-21 11:37     ` Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 07/20] vpc, vhdx: add get_info Paolo Bonzini
2013-11-20 12:39   ` Stefan Hajnoczi
2013-11-20 12:50     ` Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 08/20] block drivers: add discard/write_zeroes properties to bdrv_get_info implementation Paolo Bonzini
2013-11-21 11:33   ` Peter Lieven
2013-11-21 11:39     ` Paolo Bonzini
2013-11-21 11:48       ` Peter Lieven
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 09/20] block drivers: expose requirement for write same alignment from formats Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 10/20] block/iscsi: remove .bdrv_has_zero_init Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 11/20] block/iscsi: updated copyright Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 12/20] block/iscsi: check WRITE SAME support differently depending on MAY_UNMAP Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 13/20] block/iscsi: use UNMAP to write zeroes if LBPRZ=1 Paolo Bonzini
2013-11-21 11:43   ` Peter Lieven
2013-11-21 11:49     ` Paolo Bonzini
2013-11-21 11:54       ` Peter Lieven
2013-11-21 12:05         ` Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 14/20] raw-posix: implement write_zeroes with MAY_UNMAP for files Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 15/20] raw-posix: implement write_zeroes with MAY_UNMAP for block devices Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 16/20] raw-posix: add support for write_zeroes on XFS and " Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 17/20] qemu-iotests: 033 is fast Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 18/20] scsi-disk: catch write protection errors in UNMAP Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 19/20] scsi-disk: reject ANCHOR=1 for UNMAP and WRITE SAME commands Paolo Bonzini
2013-11-19 17:07 ` [Qemu-devel] [PATCH v2 20/20] scsi-disk: correctly implement WRITE SAME Paolo Bonzini
2013-11-19 17:23   ` ronnie sahlberg
2013-11-19 17:27     ` ronnie sahlberg
2013-11-19 17:31     ` Paolo Bonzini
2013-11-20 14:18   ` Stefan Hajnoczi
2013-11-20 14:19     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384880863-10434-1-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).