[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1384447393-13838-2-git-send-email-bergwolf@gmail.com>
Date: Fri, 15 Nov 2013 00:42:48 +0800
From: Peng Tao <bergwolf@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org,
"John L. Hammond" <john.hammond@...el.com>,
Peng Tao <bergwolf@...il.com>,
Andreas Dilger <andreas.dilger@...el.com>
Subject: [PATCH 01/26] staging/lustre/hsm: handle file ownership and timestamps
From: "John L. Hammond" <john.hammond@...el.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.hammond@...el.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@....fr>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@....fr>
Reviewed-by: Oleg Drokin <oleg.drokin@...el.com>
Signed-off-by: Peng Tao <bergwolf@...il.com>
Signed-off-by: Andreas Dilger <andreas.dilger@...el.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists