X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdt%2Fmdt_mds.c;h=02f5643518ad86c8f574bc1d9ab1079ebea1dfe3;hp=4e06880809c91432906f8d5957c1a8777ae94c94;hb=4f5830f769f9cc9bacfcdfee9de5962324fb5c81;hpb=98060d83459ba10409f295898f0ec917f938b4d3 diff --git a/lustre/mdt/mdt_mds.c b/lustre/mdt/mdt_mds.c index 4e06880..02f5643 100644 --- a/lustre/mdt/mdt_mds.c +++ b/lustre/mdt/mdt_mds.c @@ -54,7 +54,6 @@ #include #include #include -#include struct mds_device { /* super-class */ @@ -308,46 +307,6 @@ struct mdt_opc_slice mdt_fld_handlers[] = { } }; -/* Request with a format known in advance */ -#define DEF_UPDATE_HDL(flags, name, fn) \ - DEFINE_RPC_HANDLER(UPDATE_OBJ, flags, name, fn, &RQF_ ## name) - -#define target_handler mdt_handler -static struct target_handler out_ops[] = { - DEF_UPDATE_HDL(MUTABOR, UPDATE_OBJ, out_handle), -}; - -static struct mdt_opc_slice update_handlers[] = { - { - .mos_opc_start = MDS_GETATTR, - .mos_opc_end = MDS_LAST_OPC, - .mos_hs = mdt_mds_ops - }, - { - .mos_opc_start = OBD_PING, - .mos_opc_end = OBD_LAST_OPC, - .mos_hs = mdt_obd_ops - }, - { - .mos_opc_start = LDLM_ENQUEUE, - .mos_opc_end = LDLM_LAST_OPC, - .mos_hs = mdt_dlm_ops - }, - { - .mos_opc_start = SEC_CTX_INIT, - .mos_opc_end = SEC_LAST_OPC, - .mos_hs = mdt_sec_ctx_ops - }, - { - .mos_opc_start = UPDATE_OBJ, - .mos_opc_end = UPDATE_LAST_OPC, - .mos_hs = out_ops - }, - { - .mos_hs = NULL - } -}; - static int mds_regular_handle(struct ptlrpc_request *req) { return mdt_handle_common(req, mdt_regular_handlers); @@ -363,11 +322,6 @@ static int mds_mdsc_handle(struct ptlrpc_request *req) return mdt_handle_common(req, mdt_seq_handlers); } -static int mdt_out_handle(struct ptlrpc_request *req) -{ - return mdt_handle_common(req, update_handlers); -} - static int mds_mdss_handle(struct ptlrpc_request *req) { return mdt_handle_common(req, mdt_seq_handlers); @@ -563,10 +517,10 @@ static int mds_start_ptlrpc_service(struct mds_device *m) .psc_watchdog_factor = MDT_SERVICE_WATCHDOG_FACTOR, .psc_buf = { .bc_nbufs = MDS_NBUFS, - .bc_buf_size = MDS_OUT_BUFSIZE, - .bc_req_max_size = MDS_OUT_MAXREQSIZE, - .bc_rep_max_size = MDS_OUT_MAXREPSIZE, - .bc_req_portal = MDS_MDS_PORTAL, + .bc_buf_size = OUT_BUFSIZE, + .bc_req_max_size = OUT_MAXREQSIZE, + .bc_rep_max_size = OUT_MAXREPSIZE, + .bc_req_portal = OUT_PORTAL, .bc_rep_portal = MDC_REPLY_PORTAL, }, /* @@ -587,7 +541,7 @@ static int mds_start_ptlrpc_service(struct mds_device *m) .cc_pattern = mds_num_cpts, }, .psc_ops = { - .so_req_handler = mdt_out_handle, + .so_req_handler = tgt_request_handle, .so_req_printer = target_print_req, .so_hpreq_handler = NULL, }, @@ -779,7 +733,6 @@ static struct lu_device *mds_device_alloc(const struct lu_env *env, l = ERR_PTR(rc); return l; } - return l; }