From: ericm Date: Thu, 14 Sep 2006 01:02:10 +0000 (+0000) Subject: branch: b_new_cmd X-Git-Tag: v1_8_0_110~486^2~943 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=cf6402879b317b56133d4cb964acb13bfec136b6;p=fs%2Flustre-release.git branch: b_new_cmd add a empty sec context handler on mdt. --- diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index 3808808..161d28a 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -181,6 +181,10 @@ extern int obd_race_state; #define OBD_FAIL_FLD 0x1100 #define OBD_FAIL_FLD_QUERY_NET 0x1101 +#define OBD_FAIL_SEC_CTX_INIT_NET 0x1200 +#define OBD_FAIL_SEC_CTX_INIT_CONT_NET 0x1210 +#define OBD_FAIL_SEC_CTX_FINI_NET 0x1220 + /* preparation for a more advanced failure testbed (not functional yet) */ #define OBD_FAIL_MASK_SYS 0x0000FF00 #define OBD_FAIL_MASK_LOC (0x000000FF | OBD_FAIL_MASK_SYS) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index ddb9a87..335df316 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -989,6 +989,14 @@ static int mdt_cp_callback(struct mdt_thread_info *info) return -EOPNOTSUPP; } +/* + * sec context handlers + */ +static int mdt_sec_ctx_handle(struct mdt_thread_info *info) +{ + return 0; +} + /* issues dlm lock on passed @ns, @f stores it lock handle into @lh. */ int fid_lock(struct ldlm_namespace *ns, const struct lu_fid *f, struct lustre_handle *lh, ldlm_mode_t mode, @@ -3431,7 +3439,13 @@ static struct mdt_handler mdt_dlm_ops[] = { static struct mdt_handler mdt_llog_ops[] = { }; -static struct mdt_handler mdt_sec_ops[] = { +#define DEF_SEC_CTX_HNDL(name, fn) \ + DEF_HNDL(SEC_CTX, INIT, _NET, 0, name, fn, NULL) + +static struct mdt_handler mdt_sec_ctx_ops[] = { + DEF_SEC_CTX_HNDL(INIT, mdt_sec_ctx_handle), + DEF_SEC_CTX_HNDL(INIT_CONT, mdt_sec_ctx_handle), + DEF_SEC_CTX_HNDL(FINI, mdt_sec_ctx_handle) }; static struct mdt_opc_slice mdt_regular_handlers[] = { @@ -3458,7 +3472,7 @@ static struct mdt_opc_slice mdt_regular_handlers[] = { { .mos_opc_start = SEC_CTX_INIT, .mos_opc_end = SEC_LAST_OPC, - .mos_hs = mdt_sec_ops + .mos_hs = mdt_sec_ctx_ops }, { .mos_hs = NULL