Re: [libvirt] [PATCH 3/3] Shrink volume even with ALLOCATE flag

2017-09-26 Thread John Ferlan
On 09/25/2017 11:46 AM, Ján Tomko wrote: > Calling fallocate on the new (smaller) capacity ensures > that the whole file is allocated, but it does not reduce > the file size. > > Also call ftruncate after fallocate. > > https://bugzilla.redhat.com/show_bug.cgi?id=1366446 > --- > src/util/virst

[libvirt] [PATCH 3/3] Shrink volume even with ALLOCATE flag

2017-09-25 Thread Ján Tomko
Calling fallocate on the new (smaller) capacity ensures that the whole file is allocated, but it does not reduce the file size. Also call ftruncate after fallocate. https://bugzilla.redhat.com/show_bug.cgi?id=1366446 --- src/util/virstoragefile.c | 12 ++-- 1 file changed, 6 insertions(+