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

2024-07-11 Thread Stefan Hajnoczi
On Fri, Jun 28, 2024 at 11:20:58PM +0300, Nir Soffer wrote: > When opening an image with discard=off, we punch hole in the image when > writing zeroes, making the image sparse. This breaks users that want to > ensure that writes cannot fail with ENOSPACE by using fully allocated > images[1]. > > b

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

2024-06-28 Thread Nir Soffer
When opening an image with discard=off, we punch hole in the image when writing zeroes, making the image sparse. This breaks users that want to ensure that writes cannot fail with ENOSPACE by using fully allocated images[1]. bdrv_co_pwrite_zeroes() correctly disables BDRV_REQ_MAY_UNMAP if we opene