Whamcloud - gitweb
LU-5312 ptlrpc: update export_last_request_time after recovery 43/11443/2
authorWang Di <di.wang@intel.com>
Wed, 13 Aug 2014 19:34:01 +0000 (12:34 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 25 Aug 2014 18:56:29 +0000 (18:56 +0000)
Update export_last_request_time after recovery, because client can
not send ping to the server during the recovery, so we need refresh
the last_request_time to avoid the export is being evicted earlier
than it should be.

Change-Id: I1d9bf5aaa3ca4215479ddc942c7052ad047c6989
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/11443
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_net.h
lustre/ldlm/ldlm_lib.c
lustre/ptlrpc/service.c

index 3ed63bf..80541df 100644 (file)
@@ -3112,6 +3112,7 @@ int ptlrpc_service_health_check(struct ptlrpc_service *);
 void ptlrpc_server_drop_request(struct ptlrpc_request *req);
 void ptlrpc_request_change_export(struct ptlrpc_request *req,
                                  struct obd_export *export);
+void ptlrpc_update_export_timer(struct obd_export *exp, long extra_delay);
 
 #ifdef __KERNEL__
 int ptlrpc_hr_init(void);
index f0f94d4..1c370e6 100644 (file)
@@ -2061,7 +2061,11 @@ static int target_recovery_thread(void *arg)
                          libcfs_nid2str(req->rq_peer.nid));
                 handle_recovery_req(thread, req,
                                     trd->trd_recovery_handler);
-                target_request_copy_put(req);
+               /* Because the waiting client can not send ping to server,
+                * so we need refresh the last_request_time, to avoid the
+                * export is being evicted */
+               ptlrpc_update_export_timer(req->rq_export, 0);
+               target_request_copy_put(req);
         }
 
        delta = (jiffies - delta) / HZ;
index 069e05b..b7918e1 100644 (file)
@@ -1058,7 +1058,7 @@ static void ptlrpc_server_finish_active_request(
  * This function is only called when some export receives a message (i.e.,
  * the network is up.)
  */
-static void ptlrpc_update_export_timer(struct obd_export *exp, long extra_delay)
+void ptlrpc_update_export_timer(struct obd_export *exp, long extra_delay)
 {
         struct obd_export *oldest_exp;
         time_t oldest_time, new_time;
@@ -1133,6 +1133,7 @@ static void ptlrpc_update_export_timer(struct obd_export *exp, long extra_delay)
 
         EXIT;
 }
+EXPORT_SYMBOL(ptlrpc_update_export_timer);
 
 /**
  * Sanity check request \a req.