From: Olaf Hering Subject: [PATCH 08/11] libxl: add option for discard support to xl disk configuration Date: Thu, 6 Mar 2014 17:13:53 +0100 Message-ID: <1394122436-1392-9-git-send-email-olaf@aepfle.de> References: <1394122436-1392-1-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1394122436-1392-1-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Olaf Hering , Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org 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. v2: rename xenstore property from discard_enable to discard-enable update description in xl-disk-configuration.txt use libxl_defbool as type for discard_enable update check-xl-disk-parse to use "" add LIBXL_HAVE_LIBXL_DEVICE_DISK_DISCARD_ENABLE to libxl.h Signed-off-by: Olaf Hering --- docs/misc/xl-disk-configuration.txt | 15 +++++++++++++++ tools/libxl/check-xl-disk-parse | 21 ++++++++++++++------- tools/libxl/libxl.c | 3 +++ tools/libxl/libxl.h | 5 +++++ tools/libxl/libxl_types.idl | 1 + tools/libxl/libxlu_disk_l.l | 4 ++++ xen/include/public/io/blkif.h | 8 ++++++++ 7 files changed, 50 insertions(+), 7 deletions(-) diff --git a/docs/misc/xl-disk-configuration.txt b/docs/misc/xl-disk-configuration.txt index cf22397..b8077da 100644 --- a/docs/misc/xl-disk-configuration.txt +++ b/docs/misc/xl-disk-configuration.txt @@ -178,6 +178,21 @@ information to be interpreted by the executable program