block/null: Add read-pattern option
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 10 repliesIn review
- v12 patches 6 repliesSuperseded
Changes in v2 from the cover letter
- Make read-zeroes and read-pattern mutual exclusive [Eric, Markus]
- Narrow read-pattern type to uint8 [Eric, Markus]
- Update the doc comment to explain that read-zeroes emulates a sparsse image, and read-pattern emulates an allocated image. [Markus]
- Validate that read-pattern value is within range
- Update secure-coding-practices guide with read-pattern option
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | block/null: Report DATA if not reading zeroesblock/ qapi/ | +4 | 6 replies | |
| 2/2 | block/null: Add read-pattern optionblock/ docs/ qapi/ | +47 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] block/null: Add read-pattern option
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
Changes since v1:
- Make read-zeroes and read-pattern mutual exclusive [Eric, Markus]
- Narrow read-pattern type to uint8 [Eric, Markus]
- Update the doc comment to explain that read-zeroes emulates a sparsse image, and read-pattern emulates an allocated image. [Markus]
- Validate that read-pattern value is within range
- Update secure-coding-practices guide with read-pattern option
v1 was here:
https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg05098.html
Nir Soffer (2):
block/null: Report DATA if not reading zeroes
block/null: Add read-pattern option
block/null.c | 38 +++++++++++++++++++++++--- docs/devel/secure-coding-practices.rst | 3 +- qapi/block-core.json | 17 ++++++++++-- 3 files changed, 50 insertions(+), 8 deletions(-)
Signature · 1 line
2.39.5 (Apple Git-154)