[PATCH v3 0/2] Consider discard option when writing zeros

Nir Soffer posted 2 patches 2 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240628202058.1964986-1-nsoffer@redhat.com
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
block/io.c                                    |   9 +-
tests/qemu-iotests/245                        |   2 +-
tests/qemu-iotests/tests/write-zeroes-unmap   | 127 ++++++++++++++++++
.../qemu-iotests/tests/write-zeroes-unmap.out |  81 +++++++++++
4 files changed, 214 insertions(+), 5 deletions(-)
create mode 100755 tests/qemu-iotests/tests/write-zeroes-unmap
create mode 100644 tests/qemu-iotests/tests/write-zeroes-unmap.out
[PATCH v3 0/2] Consider discard option when writing zeros
Posted by Nir Soffer 2 months, 1 week ago
Punch holes only when the image is opened with discard=on or discard=unmap.

Tested by:
- new write-zeroes-unmap iotest on xfs, ext4, and tmpfs
- tests/qemu-iotests/check -raw
- tests/qemu-iotests/check -qcow2

Changes since v2
- Add write-zeroes-unmap iotest
- Fix iotest missing discard=unmap

v2 was here:
https://lists.nongnu.org/archive/html/qemu-block/2024-06/msg00231.html

Nir Soffer (2):
  qemu-iotest/245: Add missing discard=unmap
  Consider discard option when writing zeros

 block/io.c                                    |   9 +-
 tests/qemu-iotests/245                        |   2 +-
 tests/qemu-iotests/tests/write-zeroes-unmap   | 127 ++++++++++++++++++
 .../qemu-iotests/tests/write-zeroes-unmap.out |  81 +++++++++++
 4 files changed, 214 insertions(+), 5 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/write-zeroes-unmap
 create mode 100644 tests/qemu-iotests/tests/write-zeroes-unmap.out

-- 
2.45.2
Re: [PATCH v3 0/2] Consider discard option when writing zeros
Posted by Stefan Hajnoczi 1 month, 4 weeks ago
On Fri, Jun 28, 2024 at 11:20:56PM +0300, Nir Soffer wrote:
> Punch holes only when the image is opened with discard=on or discard=unmap.
> 
> Tested by:
> - new write-zeroes-unmap iotest on xfs, ext4, and tmpfs
> - tests/qemu-iotests/check -raw
> - tests/qemu-iotests/check -qcow2
> 
> Changes since v2
> - Add write-zeroes-unmap iotest
> - Fix iotest missing discard=unmap
> 
> v2 was here:
> https://lists.nongnu.org/archive/html/qemu-block/2024-06/msg00231.html
> 
> Nir Soffer (2):
>   qemu-iotest/245: Add missing discard=unmap
>   Consider discard option when writing zeros
> 
>  block/io.c                                    |   9 +-
>  tests/qemu-iotests/245                        |   2 +-
>  tests/qemu-iotests/tests/write-zeroes-unmap   | 127 ++++++++++++++++++
>  .../qemu-iotests/tests/write-zeroes-unmap.out |  81 +++++++++++
>  4 files changed, 214 insertions(+), 5 deletions(-)
>  create mode 100755 tests/qemu-iotests/tests/write-zeroes-unmap
>  create mode 100644 tests/qemu-iotests/tests/write-zeroes-unmap.out
> 
> -- 
> 2.45.2
> 

Thanks, applied to my block tree:
https://gitlab.com/stefanha/qemu/commits/block

Stefan