References: FATE#316071 Subject: libxl: add option for discard support to xl disk configuration Handle new option discard=on|off for disk configuration. It is supposed to disable discard support if file based backing storage was intentionally created non-sparse to avoid fragmentation of the file. The option is a boolean and intended for the backend driver. A new boolean property "discard-enable" is written to the backend node. An upcoming patch for qemu will make use of this property. The kernel blkback driver may be updated as well to disable discard for phy based backing storage. This change does not break ABI. Instead of adding a new member ->discard_enable to struct libxl_device_disk the existing ->readwrite member is reused. Signed-off-by: Olaf Hering --- docs/misc/xl-disk-configuration.txt | 15 +++++++++++++++ tools/libxl/libxl.c | 2 ++ tools/libxl/libxl.h | 11 +++++++++++ tools/libxl/libxlu_disk.c | 3 +++ tools/libxl/libxlu_disk_i.h | 2 +- tools/libxl/libxlu_disk_l.l | 4 ++++ 6 files changed, 36 insertions(+), 1 deletion(-) Index: xen-4.4.0-testing/docs/misc/xl-disk-configuration.txt =================================================================== --- xen-4.4.0-testing.orig/docs/misc/xl-disk-configuration.txt +++ xen-4.4.0-testing/docs/misc/xl-disk-configuration.txt @@ -178,6 +178,21 @@ information to be interpreted by the exe These scripts are normally called "block-