]> xenbits.xensource.com Git - libvirt.git/commit
storage: Support preallocate the new capacity for vol-resize
authorOsier Yang <jyang@redhat.com>
Fri, 31 May 2013 05:16:14 +0000 (13:16 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 5 Jun 2013 10:35:55 +0000 (18:35 +0800)
commitaa2a4cff7c217c18abb657cb4cebb8c68f3ee45b
tree754b497a84ad08a9411c640374d0e701958b20a8
parent70fe129546545f9683ce57e6946dd80a08b54d2b
storage: Support preallocate the new capacity for vol-resize

The document for "vol-resize" says the new capacity will be sparse
unless "--allocate" is specified, however, the "--allocate" flag
is never implemented. This implements the "--allocate" flag for
fs backend's raw type volume, based on posix_fallocate and the
syscall SYS_fallocate.
src/storage/storage_backend_fs.c
src/storage/storage_driver.c
src/util/virstoragefile.c
src/util/virstoragefile.h