From b8c7d7b28620c5d3d0298958f02e6afc6eb345ea Mon Sep 17 00:00:00 2001 From: yury Date: Fri, 29 Sep 2006 11:58:55 +0000 Subject: [PATCH] - fixes about capa. --- lustre/mdd/mdd_handler.c | 2 +- lustre/mdt/mdt_handler.c | 5 +++-- lustre/ptlrpc/layout.c | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lustre/mdd/mdd_handler.c b/lustre/mdd/mdd_handler.c index dd0b7a4..7e21847 100644 --- a/lustre/mdd/mdd_handler.c +++ b/lustre/mdd/mdd_handler.c @@ -602,7 +602,7 @@ static inline int mdd_is_sticky(const struct lu_env *env, } } -/*Check whether it may delete the cobj under the pobj*/ +/* Check whether it may delete the cobj under the pobj. */ static int mdd_may_delete(const struct lu_env *env, struct mdd_object *pobj, struct mdd_object *cobj, int is_dir, int need_check) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index d094441..628f6a2 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -1432,8 +1432,8 @@ static int mdt_lock_reply_compat(struct mdt_device *m, struct ldlm_reply *rep) */ static int mdt_body_unpack(struct mdt_thread_info *info, __u32 flags) { + struct lustre_capa *capa = NULL; const struct mdt_body *body; - struct lustre_capa *capa = NULL; struct mdt_object *obj; const struct lu_env *env; struct req_capsule *pill; @@ -1451,8 +1451,9 @@ static int mdt_body_unpack(struct mdt_thread_info *info, __u32 flags) return -EINVAL; } - if (req_capsule_get_size(pill, &RMF_CAPA1, RCL_CLIENT)) + if (req_capsule_has_field(pill, &RMF_CAPA1, RCL_CLIENT)) capa = req_capsule_client_get(pill, &RMF_CAPA1); + obj = mdt_object_find(env, info->mti_mdt, &body->fid1, capa); if (!IS_ERR(obj)) { if ((flags & HABEO_CORPUS) && diff --git a/lustre/ptlrpc/layout.c b/lustre/ptlrpc/layout.c index 6504641..ce47765 100644 --- a/lustre/ptlrpc/layout.c +++ b/lustre/ptlrpc/layout.c @@ -357,7 +357,8 @@ static const struct req_format *req_formats[] = { &RQF_MDS_READPAGE, &RQF_MDS_WRITEPAGE, &RQF_MDS_IS_SUBDIR, - &RQF_MDS_DONE_WRITING + &RQF_MDS_DONE_WRITING, + &RQF_MDS_RENEW_CAPA }; struct req_msg_field { -- 1.8.3.1