[libvirt] [PATCH 0/3] allocation fixes for virStorageFileResize

Ján Tomko jtomko at redhat.com
Mon Sep 25 15:46:07 UTC 2017


This fixes the bug of treating volume allocation as an offset
from the start of the file instead of a total of allocated bytes.

The mysterious error message:
"invalid argument: can't shrink capacity below existing allocation"
is not addressed by this series

Ján Tomko (3):
  use virFileAllocate in virStorageFileResize
  virStorageFileResize: fallocate the whole capacity
  Shrink volume even with ALLOCATE flag

 src/storage/storage_util.c |  3 +--
 src/util/virfile.c         | 11 +++++++++++
 src/util/virfile.h         |  2 ++
 src/util/virstoragefile.c  | 33 ++++++++++++++++-----------------
 src/util/virstoragefile.h  |  1 -
 5 files changed, 30 insertions(+), 20 deletions(-)

-- 
2.13.0




More information about the libvir-list mailing list