Hello,
Max Reitz, on lun. 27 févr. 2017 17:12:47 +0100, wrote:
> > #ifdef CONFIG_FALLOCATE_PUNCH_HOLE
> > -if (s->has_discard && s->has_fallocate) {
> > +if (s->has_discard && (s->has_fallocate || open_flags &
> > BDRV_O_SPARSE)) {
>
> s->has_fallocate has a meaning. I wouldn't try to c
On 27.02.2017 17:33, Samuel Thibault wrote:
> Hello,
>
> Max Reitz, on lun. 27 févr. 2017 17:12:47 +0100, wrote:
>>> #ifdef CONFIG_FALLOCATE_PUNCH_HOLE
>>> -if (s->has_discard && s->has_fallocate) {
>>> +if (s->has_discard && (s->has_fallocate || open_flags &
>>> BDRV_O_SPARSE)) {
>>
>>
Hi,
On 27.02.2017 01:45, Samuel Thibault wrote:
> By default, on discard requests, the posix block backend punches holes but
> re-fallocates them to keep the allocated size intact. In some situations
> it is however convenient, when using sparse disk images, to see disk image
> sizes shrink on dis
By default, on discard requests, the posix block backend punches holes but
re-fallocates them to keep the allocated size intact. In some situations
it is however convenient, when using sparse disk images, to see disk image
sizes shrink on discard requests.
This commit adds a discard=sparse mode wh