Whamcloud - gitweb
LU-4813 lfsck: reuse OUT_PORTAL for orphan iteration 72/9772/3
authorFan Yong <fan.yong@intel.com>
Sat, 8 Mar 2014 15:52:18 +0000 (23:52 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 4 Apr 2014 02:44:01 +0000 (02:44 +0000)
It is unnecessary to use independent request portal for LFSCK
orphan iteration, which will cause trouble for UT work in the
future and also may cause interoperability issues. So we will
reuse the existing OUT_PORTAL for the same purpose.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I721977adb58ef35651775bacab6b5f9e325eb26a
Reviewed-on: http://review.whamcloud.com/9772
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre/lustre_idl.h
lustre/include/obd_target.h
lustre/osp/osp_object.c
lustre/ost/ost_handler.c

index 7fdaa2d..b906810 100644 (file)
 #define SEQ_DATA_PORTAL                31
 #define SEQ_CONTROLLER_PORTAL          32
 #define MGS_BULK_PORTAL                33
-#define OST_IDX_PORTAL                34
 
 /* Portal 63 is reserved for the Cray Inc DVS - nic@cray.com, roe@cray.com, n8851@cray.com */
 
index cef0bd1..cbe415c 100644 (file)
@@ -78,7 +78,6 @@ struct ost_obd {
        struct ptlrpc_service   *ost_io_service;
        struct ptlrpc_service   *ost_seq_service;
        struct ptlrpc_service   *ost_out_service;
-       struct ptlrpc_service   *ost_idx_service;
        struct mutex             ost_health_mutex;
 };
 
index dcdadf3..4658f48 100644 (file)
@@ -1226,7 +1226,7 @@ static int osp_orphan_it_fetch(const struct lu_env *env,
                RETURN(rc);
        }
 
-       req->rq_request_portal = OST_IDX_PORTAL;
+       req->rq_request_portal = OUT_PORTAL;
        ptlrpc_at_set_req_timeout(req);
 
        desc = ptlrpc_prep_bulk_imp(req, npages, 1, BULK_PUT_SINK,
index f7448d4..6c1430b 100644 (file)
@@ -332,53 +332,10 @@ static int ost_setup(struct obd_device *obd, struct lustre_cfg* lcfg)
                GOTO(out_seq, rc);
        }
 
-       /* Index read service */
-       memset(&svc_conf, 0, sizeof(svc_conf));
-       svc_conf = (typeof(svc_conf)) {
-               .psc_name               = "ost_idx_read",
-               .psc_watchdog_factor    = OSS_SERVICE_WATCHDOG_FACTOR,
-               .psc_buf                = {
-                       .bc_nbufs               = OST_NBUFS,
-                       .bc_buf_size            = OST_BUFSIZE,
-                       .bc_req_max_size        = OST_MAXREQSIZE,
-                       .bc_rep_max_size        = OST_MAXREPSIZE,
-                       .bc_req_portal          = OST_IDX_PORTAL,
-                       .bc_rep_portal          = OSC_REPLY_PORTAL,
-               },
-               .psc_thr                = {
-                       .tc_thr_name            = "ll_ost_idx",
-                       .tc_thr_factor          = OSS_CR_THR_FACTOR,
-                       .tc_nthrs_init          = OSS_CR_NTHRS_INIT,
-                       .tc_nthrs_base          = OSS_CR_NTHRS_BASE,
-                       .tc_nthrs_max           = OSS_CR_NTHRS_MAX,
-                       .tc_nthrs_user          = oss_num_create_threads,
-                       .tc_cpu_affinity        = 1,
-                       .tc_ctx_tags            = LCT_DT_THREAD,
-               },
-               .psc_cpt                = {
-                       .cc_pattern             = oss_cpts,
-               },
-               .psc_ops                = {
-                       .so_req_handler         = tgt_request_handle,
-                       .so_req_printer         = target_print_req,
-               },
-       };
-       ost->ost_idx_service = ptlrpc_register_service(&svc_conf,
-                                                      obd->obd_proc_entry);
-       if (IS_ERR(ost->ost_idx_service)) {
-               rc = PTR_ERR(ost->ost_idx_service);
-               CERROR("failed to start OST index read service: rc = %d\n", rc);
-               ost->ost_idx_service = NULL;
-               GOTO(out_out, rc);
-       }
-
        ping_evictor_start();
 
        RETURN(0);
 
-out_out:
-       ptlrpc_unregister_service(ost->ost_out_service);
-       ost->ost_out_service = NULL;
 out_seq:
        ptlrpc_unregister_service(ost->ost_seq_service);
        ost->ost_seq_service = NULL;
@@ -413,14 +370,12 @@ static int ost_cleanup(struct obd_device *obd)
        ptlrpc_unregister_service(ost->ost_io_service);
        ptlrpc_unregister_service(ost->ost_seq_service);
        ptlrpc_unregister_service(ost->ost_out_service);
-       ptlrpc_unregister_service(ost->ost_idx_service);
 
        ost->ost_service = NULL;
        ost->ost_create_service = NULL;
        ost->ost_io_service = NULL;
        ost->ost_seq_service = NULL;
        ost->ost_out_service = NULL;
-       ost->ost_idx_service = NULL;
 
        mutex_unlock(&ost->ost_health_mutex);