From: "John L. Hammond" <john.hamm...@intel.com> In hsm_init_ucred() set the capability mask to CFS_CAP_FS_MASK thereby allowing the coordinator to swap layouts of files not owned by root. In mdt_orphan_open() raise CFS_CAP_DAC_OVERRIDE before creating the orphan filee in the MDT's local root. In mdt_hsm_release() set inode size and timestamps before getting the LOV xattr and ensure that the orphan file is created with the same UID and GID of the original. In lhsmtool_posix.c similalrly ensure that the volatile file used for restore has the same ownership, access and modification timestamps as the original.
Strengthen sanity-hsm test 24 to check that none of archive, release, or restore will change the access or modified timestamps. Add 24b to check that root can archive, release, and restore an ordinary user's files and that the user will be able to read a released file even if the parent directory is unwritable. Lustre-change: http://review.whamcloud.com/7461 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3811 Signed-off-by: John L. Hammond <john.hamm...@intel.com> Reviewed-by: Aurelien Degremont <aurelien.degrem...@cea.fr> Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucri...@cea.fr> Reviewed-by: Oleg Drokin <oleg.dro...@intel.com> Signed-off-by: Peng Tao <bergw...@gmail.com> Signed-off-by: Andreas Dilger <andreas.dil...@intel.com> --- .../lustre/lustre/include/lustre/lustreapi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre/lustreapi.h b/drivers/staging/lustre/lustre/include/lustre/lustreapi.h index e6ce238..597822c 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustreapi.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustreapi.h @@ -313,8 +313,8 @@ extern int llapi_hsm_action_begin(struct hsm_copyaction_private **phcp, int restore_mdt_index, int restore_open_flags, bool is_error); extern int llapi_hsm_action_end(struct hsm_copyaction_private **phcp, - const struct hsm_extent *he, int flags, - int errval); + const struct hsm_extent *he, + int hp_flags, int errval); extern int llapi_hsm_action_progress(struct hsm_copyaction_private *hcp, const struct hsm_extent *he, int hp_flags); extern int llapi_hsm_action_get_dfid(const struct hsm_copyaction_private *hcp, -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/