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

2025-04-30 Thread Nir Soffer
> On 29 Apr 2025, at 0:55, Eric Blake wrote: > > On Mon, Apr 28, 2025 at 01:59:00AM +0300, Nir Soffer wrote: >> When the `read-zeroes` is set, reads produce zeroes, and block status >> return BDRV_BLOCK_ZERO, emulating a sparse image. >> >> If we don't set `read-zeros` we report BDRV_BLOCK_DA

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

2025-04-30 Thread Nir Soffer
> On 29 Apr 2025, at 9:00, Markus Armbruster wrote: > > Eric Blake writes: > >> On Mon, Apr 28, 2025 at 01:59:00AM +0300, Nir Soffer wrote: >>> When the `read-zeroes` is set, reads produce zeroes, and block status >>> return BDRV_BLOCK_ZERO, emulating a sparse image. >>> >>> If we don't set

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

2025-04-28 Thread Markus Armbruster
Eric Blake writes: > On Mon, Apr 28, 2025 at 01:59:00AM +0300, Nir Soffer wrote: >> When the `read-zeroes` is set, reads produce zeroes, and block status >> return BDRV_BLOCK_ZERO, emulating a sparse image. >> >> If we don't set `read-zeros` we report BDRV_BLOCK_DATA, but image data >> is undefi

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

2025-04-28 Thread Eric Blake
On Mon, Apr 28, 2025 at 01:59:00AM +0300, Nir Soffer wrote: > When the `read-zeroes` is set, reads produce zeroes, and block status > return BDRV_BLOCK_ZERO, emulating a sparse image. > > If we don't set `read-zeros` we report BDRV_BLOCK_DATA, but image data > is undefined; posix_memalign, _aligne

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

2025-04-27 Thread Nir Soffer
When the `read-zeroes` is set, reads produce zeroes, and block status return BDRV_BLOCK_ZERO, emulating a sparse image. If we don't set `read-zeros` we report BDRV_BLOCK_DATA, but image data is undefined; posix_memalign, _aligned_malloc, valloc, or memalign do not promise to zero allocated memory.