[Qemu-devel] [PATCH v2 0/5] virtio-blk: add DISCARD and WRITE ZEROES features

Stefano Garzarella posted 5 patches 5 years, 1 month ago
Failed in applying to current master (apply log)
hw/block/virtio-blk.c          | 185 ++++++++++++++++++++++++++++++++-
hw/core/machine.c              |   1 +
include/hw/virtio/virtio-blk.h |   3 +
tests/virtio-blk-test.c        |  75 ++++++++++++-
4 files changed, 259 insertions(+), 5 deletions(-)
[Qemu-devel] [PATCH v2 0/5] virtio-blk: add DISCARD and WRITE ZEROES features
Posted by Stefano Garzarella 5 years, 1 month ago
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.

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)

This series requires the new virtio headers from linux v5.0-rc1
already imported by Paolo:

Based-on: <20190104082731.24967-1-pbonzini@redhat.com>

Thanks,
Stefano

Stefano Garzarella (5):
  virtio-blk: add acct_failed param to virtio_blk_handle_rw_error()
  virtio-blk: add "discard-wzeroes" boolean property
  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          | 185 ++++++++++++++++++++++++++++++++-
 hw/core/machine.c              |   1 +
 include/hw/virtio/virtio-blk.h |   3 +
 tests/virtio-blk-test.c        |  75 ++++++++++++-
 4 files changed, 259 insertions(+), 5 deletions(-)

-- 
2.20.1


Re: [Qemu-devel] [PATCH v2 0/5] virtio-blk: add DISCARD and WRITE ZEROES features
Posted by Michael S. Tsirkin 5 years, 1 month ago
On Thu, Jan 31, 2019 at 04:19:09PM +0100, Stefano Garzarella wrote:
> 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.
> 
> 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)
> 
> This series requires the new virtio headers from linux v5.0-rc1
> already imported by Paolo:
> 
> Based-on: <20190104082731.24967-1-pbonzini@redhat.com>
> 
> Thanks,
> Stefano

series:

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>


merge through block tree I guess?


> Stefano Garzarella (5):
>   virtio-blk: add acct_failed param to virtio_blk_handle_rw_error()
>   virtio-blk: add "discard-wzeroes" boolean property
>   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          | 185 ++++++++++++++++++++++++++++++++-
>  hw/core/machine.c              |   1 +
>  include/hw/virtio/virtio-blk.h |   3 +
>  tests/virtio-blk-test.c        |  75 ++++++++++++-
>  4 files changed, 259 insertions(+), 5 deletions(-)
> 
> -- 
> 2.20.1

Re: [Qemu-devel] [PATCH v2 0/5] virtio-blk: add DISCARD and WRITE ZEROES features
Posted by Stefano Garzarella 5 years, 1 month ago
On Thu, Jan 31, 2019 at 12:15:17PM -0500, Michael S. Tsirkin wrote:
> On Thu, Jan 31, 2019 at 04:19:09PM +0100, Stefano Garzarella wrote:
> > 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.
> > 
> > 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)
> > 
> > This series requires the new virtio headers from linux v5.0-rc1
> > already imported by Paolo:
> > 
> > Based-on: <20190104082731.24967-1-pbonzini@redhat.com>
> > 
> > Thanks,
> > Stefano
> 
> series:
> 
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> 
> 
> merge through block tree I guess?
> 

I guess too.

Thanks for the review!

Stefano