libvirt/src/lxc
Ján Tomko 3f029fb531 LXC: Fix handling of RAM filesystem size units
Since 76b644c when the support for RAM filesystems was introduced,
libvirt accepted the following XML:
<source usage='1024' unit='KiB'/>

This was parsed correctly and internally stored in bytes, but it
was formatted as (with an extra 's'):
<source usage='1024' units='KiB'/>
When read again, this was treated as if the units were missing,
meaning libvirt was unable to parse its own XML correctly.

The usage attribute was documented as being in KiB, but it was not
scaled if the unit was missing. Transient domains still worked,
because this was balanced by an extra 'k' in the mount options.

This patch:
Changes the parser to use 'units' instead of 'unit', as the latter
was never documented (fixing persistent domains) and some programs
(libvirt-glib, libvirt-sandbox) already parse the 'units' attribute.

Removes the extra 'k' from the tmpfs mount options, which is needed
because now we parse our own XML correctly.

Changes the default input unit to KiB to match documentation, fixing:
https://bugzilla.redhat.com/show_bug.cgi?id=1015689
2013-10-09 17:44:45 +02:00
..
libvirtd_lxc.aug Add support for sVirt in the LXC driver 2012-02-02 17:44:39 -07:00
lxc_cgroup.c Set default partition in libvirtd instead of libvirt_lxc 2013-07-26 17:46:22 +01:00
lxc_cgroup.h Auto-detect existing cgroup placement 2013-07-23 22:46:31 +01:00
lxc_conf.c Remove lxcDriverLock from almost everywhere 2013-07-18 14:16:54 +02:00
lxc_conf.h Remove lxcDriverLock from almost everywhere 2013-07-18 14:16:54 +02:00
lxc_container.c LXC: Fix handling of RAM filesystem size units 2013-10-09 17:44:45 +02:00
lxc_container.h LXC: Wire up the virDomainCreate{XML}WithFiles methods 2013-07-18 12:07:51 +01:00
lxc_controller.c lxc: fix a warning typo in virLXCControllerEventSend 2013-09-27 08:15:06 +02:00
lxc_domain.c Store a virCgroupPtr instance in virLXCDomainObjPrivatePtr 2013-04-15 17:35:31 +01:00
lxc_domain.h Store a virCgroupPtr instance in virLXCDomainObjPrivatePtr 2013-04-15 17:35:31 +01:00
lxc_driver.c Remove use of virConnectPtr from all remaining nwfilter code 2013-10-07 14:19:10 +01:00
lxc_driver.h maint: don't use config.h in .h files 2013-06-05 05:53:25 -06:00
lxc_fuse.c LXC: follow the unit style of /proc/meminfo 2013-09-23 11:01:07 +01:00
lxc_fuse.h maint: don't use config.h in .h files 2013-06-05 05:53:25 -06:00
lxc_hostdev.c lxc: Make activeUsbHostdevs use locks 2013-07-18 14:16:54 +02:00
lxc_hostdev.h Rename all USB device functions to have a standard name prefix 2013-02-05 19:22:25 +00:00
lxc_monitor_protocol.x Fix generation of systemtap probes for RPC protocols 2013-03-14 12:42:22 +00:00
lxc_monitor.c virLXCMonitorClose: Unlock domain while closing monitor 2013-07-24 17:53:00 +02:00
lxc_monitor.h Fix generation of systemtap probes for RPC protocols 2013-03-14 12:42:22 +00:00
lxc_process.c Avoid deleting NULL veth device name 2013-10-03 11:28:08 +01:00
lxc_process.h lxc: switch to virCloseCallbacks API 2013-07-18 14:16:54 +02:00
lxc.conf Standardize whitespace used in example config files 2012-05-28 10:59:13 +01:00
test_libvirtd_lxc.aug.in Autogenerate augeas test case from default config files 2012-05-28 11:07:12 +01:00