Whamcloud - gitweb
LU-10256 hsm: enable setting archive_id in hsm_set 50/30150/5
authorThomas Stibor <t.stibor@gsi.de>
Fri, 17 Nov 2017 14:31:39 +0000 (15:31 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 1 Dec 2017 05:16:46 +0000 (05:16 +0000)
commitd1855f8e22a929066a69470c7e3d082c70478575
tree76c1aa7c4c3ad55c95c60b8ace230daaf95e9c82
parentcef8983c8b5bf51b58df23a779769cc4b8ca8db5
LU-10256 hsm: enable setting archive_id in hsm_set

Setting HSM flags in lfs_hsm_change_flags(...,LFS_HSM_SET)
does not allow to specify the archive_id, that is,
in llapi_hsm_state_set(path, mask, 0, 0 /* archive_id */)
archive_id = 0 is always set, which means no identifier change.
For having full flexibility (e.g. for debugging), introduce
the additional option --archive-id in hsm_set. If the option
is not provided, the default behavior (archive_id = 0) is used
and no archive identifier change is done. In addition a
test case is provided to check the functionality and shell
function get_hsm_archive_id() is modified in favor of more
robust grep for contents after pattern approach.

Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Change-Id: I2145a18ecf32479527bb045140e5e881e58dd115
Reviewed-on: https://review.whamcloud.com/30150
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/doc/lfs-hsm.1
lustre/tests/sanity-hsm.sh
lustre/utils/lfs.c