libvirt/src
Ján Tomko 3f702f5ab1 virStorageFileResize: fallocate the whole capacity
We have been trying to implement the ALLOCATE flag to mean
"the volume should be fully allocated after the resize".

Since commit b0579ed9 we do not allocate from the existing
capacity, but from the existing allocation value.
However this value is a total of all the allocated bytes,
not an offset.

For a sparsely allocated file:
$ perl -e 'print "x"x8192;' > vol1
$ fallocate -p -o 0 -l 4096 vol1
$ virsh vol-info vol1 default
Capacity:       8.00 KiB
Allocation:     4.00 KiB

Treating allocation as an offset would result in an incompletely
allocated file:
$ virsh vol-resize vol1 --pool default 16384 --allocate
Capacity:       16.00 KiB
Allocation:     12.00 KiB

Call fallocate from zero on the whole requested capacity to fully
allocate the file. After that, the volume is fully allocated
after the resize:
$ virsh vol-resize vol1 --pool default 16384 --allocate
$ virsh vol-info vol1 default
Capacity:       16.00 KiB
Allocation:     16.00 KiB
2017-09-27 14:40:44 +02:00
..
access perl: Don't hardcode interpreter path 2017-09-19 16:04:53 +02:00
admin
bhyve cpu_conf: Drop updateCPU from virCPUDefFormat 2017-09-21 15:23:39 +02:00
conf nwfilter: Fix memory leak in virNWFilterIPAddrMapAddIPAddr 2017-09-27 07:23:44 -04:00
cpu cpu: Add new Skylake-Server CPU model 2017-09-18 15:10:46 +02:00
esx python: Don't hardcode interpreter path 2017-09-19 16:04:53 +02:00
hyperv python: Don't hardcode interpreter path 2017-09-19 16:04:53 +02:00
interface
keycodemapdb@7bf5710b22
libxl cpu_conf: Drop updateCPU from virCPUDefFormat 2017-09-21 15:23:39 +02:00
locking Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
logging daemon: logging: Fix --verbose option being ignored by the daemon 2017-08-28 16:42:13 +02:00
lxc Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
network network: Use self inflating bitmap for class IDs 2017-08-17 14:58:11 +02:00
node_device nodedev: Introduce udevHandleOneDevice 2017-08-17 16:50:47 +02:00
nwfilter nwfilter: Fix memory leak in learnIPAddressThread 2017-09-27 07:31:08 -04:00
openvz
phyp
qemu qemu: fix hotplug of udp device with no connect host 2017-09-27 12:38:27 +02:00
remote Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
rpc Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
secret
security Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
storage virStorageFileResize: fallocate the whole capacity 2017-09-27 14:40:44 +02:00
test cpu_conf: Drop updateCPU from virCPUDefFormat 2017-09-21 15:23:39 +02:00
uml
util virStorageFileResize: fallocate the whole capacity 2017-09-27 14:40:44 +02:00
vbox vbox: fix typo in warning message 2017-08-14 02:56:35 +02:00
vmware
vmx vmx: Expose VMware Managed Object Reference (moref) in XML. 2017-09-04 09:48:32 +01:00
vz cpu_conf: Drop updateCPU from virCPUDefFormat 2017-09-21 15:23:39 +02:00
xen introduce virConfReadString 2017-08-08 12:19:17 +02:00
xenapi
xenconfig storage: Introduce VIR_STORAGE_NET_PROTOCOL_VXHS 2017-09-19 21:10:21 -04:00
admin_protocol-structs
check-aclperms.pl perl: Don't hardcode interpreter path 2017-09-19 16:04:53 +02:00
check-aclrules.pl perl: Don't hardcode interpreter path 2017-09-19 16:04:53 +02:00
check-driverimpls.pl perl: Don't hardcode interpreter path 2017-09-19 16:04:53 +02:00
check-drivername.pl perl: Don't hardcode interpreter path 2017-09-19 16:04:53 +02:00
check-symfile.pl perl: Don't hardcode interpreter path 2017-09-19 16:04:53 +02:00
check-symsorting.pl perl: Don't hardcode interpreter path 2017-09-19 16:04:53 +02:00
datatypes.c
datatypes.h virConnect: Update comment for @privateData 2017-08-02 10:03:23 +02:00
driver-hypervisor.h lib: Add API to edit domain's managed save state xml configuration 2017-08-29 13:40:13 +02:00
driver-interface.h
driver-network.h
driver-nodedev.h
driver-nwfilter.h
driver-secret.h
driver-state.h
driver-storage.h
driver-stream.h
driver.c driver: conditionalize use of dlopen functions & use mingw-dlfcn 2017-08-02 13:51:28 +01:00
driver.h
dtrace2systemtap.pl perl: Don't hardcode interpreter path 2017-09-19 16:04:53 +02:00
internal.h
libvirt_admin_private.syms
libvirt_admin_public.syms
libvirt_atomic.syms
libvirt_driver_modules.syms
libvirt_esx.syms
libvirt_gnutls.syms
libvirt_internal.h
libvirt_libssh2.syms
libvirt_libssh.syms
libvirt_linux.syms
libvirt_lxc.syms
libvirt_openvz.syms
libvirt_private.syms storage: Introduce APIs to search/scan storage pool volumes list 2017-09-19 08:28:50 -04:00
libvirt_probes.d
libvirt_public.syms lib: Add API to edit domain's managed save state xml configuration 2017-08-29 13:40:13 +02:00
libvirt_qemu_probes.d
libvirt_qemu.syms
libvirt_remote.syms
libvirt_sasl.syms
libvirt_vmware.syms
libvirt_vmx.syms
libvirt_xenconfig.syms
libvirt_xenxlconfig.syms
libvirt-admin.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-admin.conf
libvirt-domain-snapshot.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-domain.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-host.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-interface.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-lxc.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-lxc.pc.in
libvirt-network.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-nodedev.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-nwfilter.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-qemu.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-qemu.pc.in
libvirt-secret.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-storage.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt-stream.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
libvirt.conf
libvirt.pc.in
lock_protocol-structs
lxc_monitor_protocol-structs
lxc_protocol-structs
Makefile.am Link libvirt_util.la with gnutls 2017-09-20 09:40:53 +01:00
qemu_protocol-structs
README
remote_protocol-structs lib: Add API to edit domain's managed save state xml configuration 2017-08-29 13:40:13 +02:00
virkeepaliveprotocol-structs
virnetprotocol-structs

       libvirt library code README
       ===========================

The directory provides the bulk of the libvirt codebase. Everything
except for the libvirtd daemon and client tools. The build uses a
large number of libtool convenience libraries - one for each child
directory, and then links them together for the final libvirt.so,
although some bits get linked directly to libvirtd daemon instead.

The files directly in this directory are supporting the public API
entry points & data structures.

There are two core shared modules to be aware of:

 * util/  - a collection of shared APIs that can be used by any
            code. This directory is always in the include path
            for all things built

 * conf/  - APIs for parsing / manipulating all the official XML
            files used by the public API. This directory is only
            in the include path for driver implementation modules

 * vmx/   - VMware VMX config handling (used by esx/ and vmware/)


Then there are the hypervisor implementations:

 * bhyve         - bhyve - The BSD Hypervisor
 * esx/          - VMware ESX and GSX support using vSphere API over SOAP
 * hyperv/       - Microsoft Hyper-V support using WinRM
 * lxc/          - Linux Native Containers
 * openvz/       - OpenVZ containers using cli tools
 * phyp/         - IBM Power Hypervisor using CLI tools over SSH
 * qemu/         - QEMU / KVM using qemu CLI/monitor
 * remote/       - Generic libvirt native RPC client
 * test/         - A "mock" driver for testing
 * uml/          - User Mode Linux
 * vbox/         - Virtual Box using native API
 * vmware/       - VMware Workstation and Player using the vmrun tool
 * xen/          - Xen using hypercalls, XenD SEXPR & XenStore
 * xenapi/       - Xen using libxenserver


Finally some secondary drivers that are shared for several HVs.
Currently these are used by LXC, OpenVZ, QEMU, UML and Xen drivers.
The ESX, Hyper-V, Power Hypervisor, Remote, Test & VirtualBox drivers all
implement the secondary drivers directly

 * cpu/          - CPU feature management
 * interface/    - Host network interface management
 * network/      - Virtual NAT networking
 * nwfilter/     - Network traffic filtering rules
 * node_device/  - Host device enumeration
 * secret/       - Secret management
 * security/     - Mandatory access control drivers
 * storage/      - Storage management drivers


Since both the hypervisor and secondary drivers can be built as
dlopen()able modules, it is *FORBIDDEN* to have build dependencies
between these directories. Drivers are only allowed to depend on
the public API, and the internal APIs in the util/ and conf/
directories