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

2025-05-16 Thread Nir Soffer
> On 8 May 2025, at 8:28, Markus Armbruster wrote: > > Nir Soffer writes: > >> 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 v2 2/2] block/null: Add read-pattern option

2025-05-09 Thread Markus Armbruster
Eric Blake writes: > On Thu, May 08, 2025 at 07:28:26AM +0200, Markus Armbruster wrote: >> Let's take a step back from the concrete interface and ponder what we're >> trying to do. We want three cases: >> >> * Allocated, reads return unspecified crap (security hazard) >> >> * Allocated, reads

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

2025-05-08 Thread Eric Blake
On Thu, May 08, 2025 at 07:28:26AM +0200, Markus Armbruster wrote: > Let's take a step back from the concrete interface and ponder what we're > trying to do. We want three cases: > > * Allocated, reads return unspecified crap (security hazard) > > * Allocated, reads return specified data > > *

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

2025-05-07 Thread Markus Armbruster
Nir Soffer writes: > 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 p

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

2025-04-30 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.