From 4dd60f8e4d4ad0ce7a0c74d0063d396aae0223bb Mon Sep 17 00:00:00 2001 From: Fan Yong Date: Sat, 8 Mar 2014 23:52:18 +0800 Subject: [PATCH] LU-4813 lfsck: reuse OUT_PORTAL for orphan iteration 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 Change-Id: I721977adb58ef35651775bacab6b5f9e325eb26a Reviewed-on: http://review.whamcloud.com/9772 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/include/lustre/lustre_idl.h | 1 - lustre/include/obd_target.h | 1 - lustre/osp/osp_object.c | 2 +- lustre/ost/ost_handler.c | 45 -------------------------------------- 4 files changed, 1 insertion(+), 48 deletions(-) diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index 7fdaa2d..b906810 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -141,7 +141,6 @@ #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 */ diff --git a/lustre/include/obd_target.h b/lustre/include/obd_target.h index cef0bd1..cbe415c 100644 --- a/lustre/include/obd_target.h +++ b/lustre/include/obd_target.h @@ -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; }; diff --git a/lustre/osp/osp_object.c b/lustre/osp/osp_object.c index dcdadf3..4658f48 100644 --- a/lustre/osp/osp_object.c +++ b/lustre/osp/osp_object.c @@ -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, diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index f7448d4..6c1430b 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -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); -- 1.8.3.1