}
};
-/* 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);
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);
.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,
},
/*
.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,
},
l = ERR_PTR(rc);
return l;
}
-
return l;
}