LXC: Fix handling of RAM filesystem size units
Since 76b644c3 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
Showing
-
mentioned in commit e69a585d
-
mentioned in commit 34ba55e9
-
mentioned in commit 9ca16307
-
mentioned in commit cac16b5d
-
mentioned in commit b2dff001
-
mentioned in commit 1490efc9
-
mentioned in commit 9ca82be6
-
mentioned in commit 011d67bf
-
mentioned in commit ff221ba5
-
mentioned in commit 4fc44677
想要评论请 注册 或 登录