Whamcloud - gitweb
LU-10256 hsm: enable setting archive_id in hsm_set 00/30500/2
authorThomas Stibor <t.stibor@gsi.de>
Fri, 17 Nov 2017 14:31:39 +0000 (15:31 +0100)
committerJohn L. Hammond <john.hammond@intel.com>
Tue, 19 Dec 2017 20:15:29 +0000 (20:15 +0000)
commit302e4ec4bd923b79690d8c9e7004e0ae0c67be98
tree139ba73343321d33dfaafc867dcd6f2e095eb8be
parent924586bdcc5a053bc06ef7c73ae2112866b880c5
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.

Lustre-change: https://review.whamcloud.com/30150
Lustre-commit: d1855f8e22a929066a69470c7e3d082c70478575

Test-Parameters: trivial testlist=sanity-hsm

Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Change-Id: I2145a18ecf32479527bb045140e5e881e58dd115
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30500
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/doc/lfs-hsm.1
lustre/tests/sanity-hsm.sh
lustre/utils/lfs.c