Whamcloud - gitweb
LU-9324 lfs: add setstripe --yaml=template parameter 60/26860/34
authorBobi Jam <bobijam.xu@intel.com>
Tue, 25 Apr 2017 01:18:44 +0000 (09:18 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 3 Mar 2018 04:28:09 +0000 (04:28 +0000)
commit1a3cce7bb6c657454f87c33ef794805f651e5395
treeb4cf5095ccf18a2311fdde14987901b76d045a7b
parent2a9518b1f820f833cbfcff42c6606413a1f5d3e7
LU-9324 lfs: add setstripe --yaml=template parameter

Add a "lfs setstripe --yaml=<yaml_template> <lustre_file_or_dir>"
usage to set stripe using stripe info from a YAML template file.

The YAML template file can be get from
$ lfs getstripe --yaml <lustre_file_or_dir>
and user can manually edit it to tweak stripe options.

This patch fixes two cyaml issues:
1. a YAML_BLOCK_ENTRY_TOKEN can follow a YAML_VALUE_TOKEN.
2. free_node() has memory leak, it needs to free
   cYAML::cy_valuestring and cYAML::cy_string if possible.

Test-Parameters: testlist=sanity-pfl,sanity-flr
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I78149bb011fbc03387cbe3d057eb030550dd75ae
Reviewed-on: https://review.whamcloud.com/26860
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/utils/lnetconfig/cyaml.c
lustre/doc/lfs-getstripe.1
lustre/doc/lfs-setstripe.1
lustre/doc/lfs.1
lustre/include/lustre/lustreapi.h
lustre/tests/sanity-flr.sh
lustre/tests/sanity-pfl.sh
lustre/utils/Makefile.am
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_layout.c