From: Oleg Drokin Date: Tue, 29 Sep 2015 03:43:49 +0000 (-0400) Subject: staging/lustre: Remove high-priority request callbacks X-Git-Tag: firefly_0821_release~176^2~802^2~1403 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=942f38903c6c00db24d6bfc42af79dba6bd895ba;p=firefly-linux-kernel-4.4.55.git staging/lustre: Remove high-priority request callbacks This function is only used on the server where real high-priority requests actually exist. This deletes ptlrpc_hpreq_handler() and ptlrpc_request_change_export() Reported-by: Arnd Bergmann Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index e7faf0e3ec11..090484b66951 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -2526,7 +2526,6 @@ struct ptlrpc_service_conf { */ void ptlrpc_dispatch_difficult_reply(struct ptlrpc_reply_state *rs); void ptlrpc_schedule_difficult_reply(struct ptlrpc_reply_state *rs); -int ptlrpc_hpreq_handler(struct ptlrpc_request *req); struct ptlrpc_service *ptlrpc_register_service( struct ptlrpc_service_conf *conf, struct kset *parent, @@ -2538,8 +2537,6 @@ int ptlrpc_unregister_service(struct ptlrpc_service *service); int liblustre_check_services(void *arg); void ptlrpc_daemonize(char *name); void ptlrpc_server_drop_request(struct ptlrpc_request *req); -void ptlrpc_request_change_export(struct ptlrpc_request *req, - struct obd_export *export); int ptlrpc_hr_init(void); void ptlrpc_hr_fini(void); diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c index 506fc365a305..353ac22296fa 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/service.c +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c @@ -819,35 +819,6 @@ void ptlrpc_server_drop_request(struct ptlrpc_request *req) } } -/** Change request export and move hp request from old export to new */ -void ptlrpc_request_change_export(struct ptlrpc_request *req, - struct obd_export *export) -{ - if (req->rq_export != NULL) { - if (!list_empty(&req->rq_exp_list)) { - /* remove rq_exp_list from last export */ - spin_lock_bh(&req->rq_export->exp_rpc_lock); - list_del_init(&req->rq_exp_list); - spin_unlock_bh(&req->rq_export->exp_rpc_lock); - - /* export has one reference already, so it`s safe to - * add req to export queue here and get another - * reference for request later */ - spin_lock_bh(&export->exp_rpc_lock); - list_add(&req->rq_exp_list, &export->exp_hp_rpcs); - spin_unlock_bh(&export->exp_rpc_lock); - } - class_export_rpc_dec(req->rq_export); - class_export_put(req->rq_export); - } - - /* request takes one export refcount */ - req->rq_export = class_export_get(export); - class_export_rpc_inc(export); - - return; -} - /** * to finish a request: stop sending more early replies, and release * the request. @@ -1329,30 +1300,6 @@ static void ptlrpc_server_hpreq_fini(struct ptlrpc_request *req) } } -static int ptlrpc_hpreq_check(struct ptlrpc_request *req) -{ - return 1; -} - -static struct ptlrpc_hpreq_ops ptlrpc_hpreq_common = { - .hpreq_check = ptlrpc_hpreq_check, -}; - -/* Hi-Priority RPC check by RPC operation code. */ -int ptlrpc_hpreq_handler(struct ptlrpc_request *req) -{ - int opc = lustre_msg_get_opc(req->rq_reqmsg); - - /* Check for export to let only reconnects for not yet evicted - * export to become a HP rpc. */ - if ((req->rq_export != NULL) && - (opc == OBD_PING || opc == MDS_CONNECT || opc == OST_CONNECT)) - req->rq_ops = &ptlrpc_hpreq_common; - - return 0; -} -EXPORT_SYMBOL(ptlrpc_hpreq_handler); - static int ptlrpc_server_request_add(struct ptlrpc_service_part *svcpt, struct ptlrpc_request *req) {