Whamcloud - gitweb
LU-3467 target: move OUT to the unified target code
[fs/lustre-release.git] / lustre / mdt / mdt_mds.c
index ab00870..02f5643 100644 (file)
@@ -307,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);
@@ -362,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);
@@ -562,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,
                },
                /*
@@ -586,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,
                },
@@ -778,7 +733,6 @@ static struct lu_device *mds_device_alloc(const struct lu_env *env,
                l = ERR_PTR(rc);
                return l;
        }
-
        return l;
 }