]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/lustre/pinger: remove never implemented suspend timeouts functionality
authorDmitry Eremin <dmitry.eremin@intel.com>
Tue, 3 Dec 2013 13:58:51 +0000 (21:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2013 16:51:44 +0000 (08:51 -0800)
This is part of original Lustre tree commit. It removes never implemented
suspend timeouts functionality from pinger.c which was commented out
since 2007 and going to be replaced by adaptive timeouts. Also removed all
references to this functionality from ldlm_lockd.c, ldlm_request.c and
import.c which actually nevers executes or do nothing.

Lustre-change: http://review.whamcloud.com/6139
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3204
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre_ha.h
drivers/staging/lustre/lustre/include/lustre_net.h
drivers/staging/lustre/lustre/ldlm/ldlm_request.c
drivers/staging/lustre/lustre/ptlrpc/import.c
drivers/staging/lustre/lustre/ptlrpc/pinger.c

index 105f6d61eef00e8d9ecbad482e56ba75192d47d2..f3ae02b3eef3efaec9ac46a7784cb8725ad36458 100644 (file)
@@ -58,9 +58,6 @@ void ptlrpc_activate_import(struct obd_import *imp);
 void ptlrpc_deactivate_import(struct obd_import *imp);
 void ptlrpc_invalidate_import(struct obd_import *imp);
 void ptlrpc_fail_import(struct obd_import *imp, __u32 conn_cnt);
-int ptlrpc_check_suspend(void);
-void ptlrpc_activate_timeouts(struct obd_import *imp);
-void ptlrpc_deactivate_timeouts(struct obd_import *imp);
 
 /** @} ha */
 
index 91f28e363be2922399743b5758581d6b5f8dd26e..6c5479b2d715f8b3fbedb3f99641d42189acc078 100644 (file)
@@ -3403,10 +3403,8 @@ int ptlrpc_del_timeout_client(struct list_head *obd_list,
                              enum timeout_event event);
 struct ptlrpc_request * ptlrpc_prep_ping(struct obd_import *imp);
 int ptlrpc_obd_ping(struct obd_device *obd);
-cfs_time_t ptlrpc_suspend_wakeup_time(void);
 void ping_evictor_start(void);
 void ping_evictor_stop(void);
-int ptlrpc_check_and_wait_suspend(struct ptlrpc_request *req);
 void ptlrpc_pinger_ir_up(void);
 void ptlrpc_pinger_ir_down(void);
 /** @} */
index 4974becb3d9b83f81e7cea7828b706334a7f2514..a8f8c1cace27555eab9313fe9ea31ffc8f93152b 100644 (file)
@@ -97,9 +97,6 @@ int ldlm_expired_completion_wait(void *data)
        if (lock->l_conn_export == NULL) {
                static cfs_time_t next_dump = 0, last_dump = 0;
 
-               if (ptlrpc_check_suspend())
-                       return 0;
-
                LCONSOLE_WARN("lock timed out (enqueued at "CFS_TIME_T", "
                              CFS_DURATION_T"s ago)\n",
                              lock->l_last_activity,
index 283173a2fe2334fcf44165e0d7fc9d31bea59f71..f465547eb95e8d681ab411c4d1a7351ddc8189ed 100644 (file)
@@ -170,7 +170,6 @@ int ptlrpc_set_import_discon(struct obd_import *imp, __u32 conn_cnt)
                               target_len, target_start,
                               libcfs_nid2str(imp->imp_connection->c_peer.nid));
                }
-               ptlrpc_deactivate_timeouts(imp);
                IMPORT_SET_STATE_NOLOCK(imp, LUSTRE_IMP_DISCON);
                spin_unlock(&imp->imp_lock);
 
@@ -383,7 +382,6 @@ void ptlrpc_activate_import(struct obd_import *imp)
 
        spin_lock(&imp->imp_lock);
        imp->imp_invalid = 0;
-       ptlrpc_activate_timeouts(imp);
        spin_unlock(&imp->imp_lock);
        obd_import_event(obd, imp, IMP_EVENT_ACTIVE);
 }
index 4684b03c4a5f8bbc6bb43957f920bdfbd3f54868..6dff502ce23e6fdc3764cda314a3cf346b582735 100644 (file)
@@ -141,9 +141,6 @@ static inline int ptlrpc_next_reconnect(struct obd_import *imp)
                return cfs_time_shift(obd_timeout);
 }
 
-static atomic_t suspend_timeouts = ATOMIC_INIT(0);
-static cfs_time_t suspend_wakeup_time = 0;
-
 cfs_duration_t pinger_check_timeout(cfs_time_t time)
 {
        struct timeout_item *item;
@@ -163,67 +160,6 @@ cfs_duration_t pinger_check_timeout(cfs_time_t time)
                                         cfs_time_current());
 }
 
-static wait_queue_head_t suspend_timeouts_waitq;
-
-cfs_time_t ptlrpc_suspend_wakeup_time(void)
-{
-       return suspend_wakeup_time;
-}
-
-void ptlrpc_deactivate_timeouts(struct obd_import *imp)
-{
-       /*XXX: disabled for now, will be replaced by adaptive timeouts */
-#if 0
-       if (imp->imp_no_timeout)
-               return;
-       imp->imp_no_timeout = 1;
-       atomic_inc(&suspend_timeouts);
-       CDEBUG(D_HA|D_WARNING, "deactivate timeouts %u\n",
-              atomic_read(&suspend_timeouts));
-#endif
-}
-
-void ptlrpc_activate_timeouts(struct obd_import *imp)
-{
-       /*XXX: disabled for now, will be replaced by adaptive timeouts */
-#if 0
-       if (!imp->imp_no_timeout)
-               return;
-       imp->imp_no_timeout = 0;
-       LASSERT(atomic_read(&suspend_timeouts) > 0);
-       if (atomic_dec_and_test(&suspend_timeouts)) {
-               suspend_wakeup_time = cfs_time_current();
-               wake_up(&suspend_timeouts_waitq);
-       }
-       CDEBUG(D_HA|D_WARNING, "activate timeouts %u\n",
-              atomic_read(&suspend_timeouts));
-#endif
-}
-
-int ptlrpc_check_suspend(void)
-{
-       if (atomic_read(&suspend_timeouts))
-               return 1;
-       return 0;
-}
-
-int ptlrpc_check_and_wait_suspend(struct ptlrpc_request *req)
-{
-       struct l_wait_info lwi;
-
-       if (atomic_read(&suspend_timeouts)) {
-               DEBUG_REQ(D_NET, req, "-- suspend %d regular timeout",
-                         atomic_read(&suspend_timeouts));
-               lwi = LWI_INTR(NULL, NULL);
-               l_wait_event(suspend_timeouts_waitq,
-                            atomic_read(&suspend_timeouts) == 0, &lwi);
-               DEBUG_REQ(D_NET, req, "-- recharge regular timeout");
-               return 1;
-       }
-       return 0;
-}
-
-
 static bool ir_up;
 
 void ptlrpc_pinger_ir_up(void)
@@ -378,7 +314,6 @@ int ptlrpc_start_pinger(void)
                return -EALREADY;
 
        init_waitqueue_head(&pinger_thread.t_ctl_waitq);
-       init_waitqueue_head(&suspend_timeouts_waitq);
 
        strcpy(pinger_thread.t_name, "ll_ping");