|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] libxl: add option for discard support to xl disk configuration
Il 29/04/2014 12:35, Olaf Hering ha scritto: 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. v3: enable discard unconditionally by always writing discard-enable=1 to xenstore fix typos in xl-disk-configuration.txt update description in blkif.h, property should be ignored if unsupported 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 "<default>" add LIBXL_HAVE_LIBXL_DEVICE_DISK_DISCARD_ENABLE to libxl.h Signed-off-by: Olaf Hering <olaf@xxxxxxxxx> --- docs/misc/xl-disk-configuration.txt | 15 +++++++++++++++ tools/libxl/check-xl-disk-parse | 21 ++++++++++++++------- tools/libxl/libxl.c | 2 ++ tools/libxl/libxl.h | 5 +++++ tools/libxl/libxl_types.idl | 1 + tools/libxl/libxlu_disk.c | 2 ++ tools/libxl/libxlu_disk_l.l | 4 ++++ xen/include/public/io/blkif.h | 10 ++++++++++ 8 files changed, 53 insertions(+), 7 deletions(-) Thanks for add discard (trim) support on libxl, from a quick look to this patch, however, seems missing adding the parameter to qemu disks that use qdisk (in libxl_dm.c: -drive ...,discard=on). Thanks for any reply and sorry for my bad english. diff --git a/docs/misc/xl-disk-configuration.txt b/docs/misc/xl-disk-configuration.txt index cf22397..b4a9376 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 <script>, These scripts are normally called "block-<script>".+discard=<boolean>+--------------- + +Description: Instruct backend to advertise discard support to frontend +Supported values: on, off, 0, 1 +Mandatory: No +Default value: on + +This option is an advisory setting for the backend driver, depending on the +value, to advertise discard support (TRIM, UNMAP) to the frontend. The real +benefit of this option is to be able to force it off rather than on. It allows +to disable "hole punching" for file based backends which were intentionally +created non-sparse to avoid fragmentation of the file. + +============================================ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |