[PATCH 0/2] block/null: Add read-pattern

Nir Soffer posted 2 patches 6 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250427225900.24316-1-nirsof@gmail.com
Maintainers: Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
block/null.c         | 21 ++++++++++++++++++---
qapi/block-core.json |  9 ++++++++-
2 files changed, 26 insertions(+), 4 deletions(-)
[PATCH 0/2] block/null: Add read-pattern
Posted by Nir Soffer 6 months, 3 weeks ago
The null driver is very usefull for testing and benchmarking, but it can not
emulate an image full of zeroes or an image full of non-zero bytes. Such images
are needed for testing computing a blkhash via qemu-nbd or qemu-storage-daemon.

This change adds `read-pattern` option allowing emulution of image full of
zeroes and image for of non-zero bytes.

I used this for testing
https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg05096.html

Nir Soffer (2):
  block/null: Report DATA if not reading zeroes
  block/null: Add read-pattern option

 block/null.c         | 21 ++++++++++++++++++---
 qapi/block-core.json |  9 ++++++++-
 2 files changed, 26 insertions(+), 4 deletions(-)

-- 
2.39.5 (Apple Git-154)