qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/6] virtio-blk: add DISCARD and WRITE_ZEROES features
@ 2019-02-06 11:27 Stefano Garzarella
  2019-02-06 11:27 ` [Qemu-devel] [PATCH v3 1/6] virtio-blk: add acct_failed param to virtio_blk_handle_rw_error() Stefano Garzarella
                   ` (11 more replies)
  0 siblings, 12 replies; 17+ messages in thread
From: Stefano Garzarella @ 2019-02-06 11:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Dr . David Alan Gilbert, qemu-block, Thomas Huth,
	Michael S. Tsirkin, Max Reitz, Marcel Apfelbaum, Kevin Wolf,
	Eduardo Habkost, Stefan Hajnoczi, Laurent Vivier

This series adds the support of DISCARD and WRITE_ZEROES commands
and extends the virtio-blk-test to test WRITE_ZEROES command when
the feature is enabled.

v3:
- rebased on master (I removed Based-on tag since the new virtio headers from
  linux v5.0-rc1 are merged)
- added patch 2 to add host_features field (as in virtio-net) [Michael]
- fixed patch 3 (previously 2/5) using the new host_features field
- fixed patch 4 (previously 3/5) following the Stefan's comments:
                - fixed name of functions and fields
                - used vdev and s pointers
                - removed "wz-may-unmap" property
                - split "dwz-max-sectors" in two properties

v2:
- added patch 1 to use virtio_blk_handle_rw_error() with discard operation
- added patch 2 to make those new features machine-type dependent (thanks David)
- fixed patch 3 (previously patch 1/2) adding more checks, block_acct_start()
                for WRITE_ZEROES requests, and configurable parameters to
                initialize the limits (max_sectors, wzeroes_may_unmap).
                (thanks Stefan)
                I moved in a new function the code to handle a single segment,
                in order to simplify the support of multiple segments in the
                future.
- added patch 4 to change the assert on data_size following the discussion with
                Thomas, Changpeng, Michael, and Stefan (thanks all)
- fixed patch 5 (previously patch 2/2) using local dwz_hdr variable instead of
                dynamic allocation (thanks Thomas)

Thanks,
Stefano

Stefano Garzarella (6):
  virtio-blk: add acct_failed param to virtio_blk_handle_rw_error()
  virtio-blk: add host_features field in VirtIOBlock
  virtio-blk: add "discard" and "write-zeroes" properties
  virtio-blk: add DISCARD and WRITE_ZEROES features
  tests/virtio-blk: change assert on data_size in virtio_blk_request()
  tests/virtio-blk: add test for WRITE_ZEROES command

 hw/block/virtio-blk.c          | 213 +++++++++++++++++++++++++++++++--
 hw/core/machine.c              |   2 +
 include/hw/virtio/virtio-blk.h |   5 +-
 tests/virtio-blk-test.c        |  75 +++++++++++-
 4 files changed, 281 insertions(+), 14 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-02-08  8:05 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-06 11:27 [Qemu-devel] [PATCH v3 0/6] virtio-blk: add DISCARD and WRITE_ZEROES features Stefano Garzarella
2019-02-06 11:27 ` [Qemu-devel] [PATCH v3 1/6] virtio-blk: add acct_failed param to virtio_blk_handle_rw_error() Stefano Garzarella
2019-02-06 11:27 ` [Qemu-devel] [PATCH v3 2/6] virtio-blk: add host_features field in VirtIOBlock Stefano Garzarella
2019-02-06 11:27 ` [Qemu-devel] [PATCH v3 3/6] virtio-blk: add "discard" and "write-zeroes" properties Stefano Garzarella
2019-02-06 11:27 ` [Qemu-devel] [PATCH v3 4/6] virtio-blk: add DISCARD and WRITE_ZEROES features Stefano Garzarella
2019-02-06 11:27 ` [Qemu-devel] [PATCH v3 5/6] tests/virtio-blk: change assert on data_size in virtio_blk_request() Stefano Garzarella
2019-02-06 11:32   ` Thomas Huth
2019-02-06 11:27 ` [Qemu-devel] [PATCH v3 6/6] tests/virtio-blk: add test for WRITE_ZEROES command Stefano Garzarella
2019-02-06 11:39   ` Thomas Huth
2019-02-07 19:21 ` [Qemu-devel] [PATCH v3 0/6] virtio-blk: add DISCARD and WRITE_ZEROES features no-reply
2019-02-07 19:30 ` Michael S. Tsirkin
2019-02-07 20:17   ` Stefano Garzarella
2019-02-08  0:28 ` no-reply
2019-02-08  1:18 ` no-reply
2019-02-08  1:34 ` no-reply
2019-02-08  6:06 ` Stefan Hajnoczi
2019-02-08  8:04   ` Stefano Garzarella

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).