]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/lustre: Remove high-priority request callbacks
authorOleg Drokin <green@linuxhacker.ru>
Tue, 29 Sep 2015 03:43:49 +0000 (23:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 13:22:27 +0000 (15:22 +0200)
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 <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre_net.h
drivers/staging/lustre/lustre/ptlrpc/service.c

index e7faf0e3ec110cc86d80209b43c468775f838bac..090484b669515b867836effeb09ff1b0c49fe163 100644 (file)
@@ -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);
index 506fc365a30546ffbc51dafec4c764fa4db64a3c..353ac22296fa0edc12acab8182f39cd9ad3b5b12 100644 (file)
@@ -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)
 {