Commit f4420b24 authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman

staging/lustre/pinger: remove never implemented suspend timeouts functionality

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-3204Signed-off-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: default avatarNed Bass <bass6@llnl.gov>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarPeng Tao <bergwolf@gmail.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4504a3c1
...@@ -58,9 +58,6 @@ void ptlrpc_activate_import(struct obd_import *imp); ...@@ -58,9 +58,6 @@ void ptlrpc_activate_import(struct obd_import *imp);
void ptlrpc_deactivate_import(struct obd_import *imp); void ptlrpc_deactivate_import(struct obd_import *imp);
void ptlrpc_invalidate_import(struct obd_import *imp); void ptlrpc_invalidate_import(struct obd_import *imp);
void ptlrpc_fail_import(struct obd_import *imp, __u32 conn_cnt); 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 */ /** @} ha */
......
...@@ -3403,10 +3403,8 @@ int ptlrpc_del_timeout_client(struct list_head *obd_list, ...@@ -3403,10 +3403,8 @@ int ptlrpc_del_timeout_client(struct list_head *obd_list,
enum timeout_event event); enum timeout_event event);
struct ptlrpc_request * ptlrpc_prep_ping(struct obd_import *imp); struct ptlrpc_request * ptlrpc_prep_ping(struct obd_import *imp);
int ptlrpc_obd_ping(struct obd_device *obd); int ptlrpc_obd_ping(struct obd_device *obd);
cfs_time_t ptlrpc_suspend_wakeup_time(void);
void ping_evictor_start(void); void ping_evictor_start(void);
void ping_evictor_stop(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_up(void);
void ptlrpc_pinger_ir_down(void); void ptlrpc_pinger_ir_down(void);
/** @} */ /** @} */
......
...@@ -97,9 +97,6 @@ int ldlm_expired_completion_wait(void *data) ...@@ -97,9 +97,6 @@ int ldlm_expired_completion_wait(void *data)
if (lock->l_conn_export == NULL) { if (lock->l_conn_export == NULL) {
static cfs_time_t next_dump = 0, last_dump = 0; 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", " LCONSOLE_WARN("lock timed out (enqueued at "CFS_TIME_T", "
CFS_DURATION_T"s ago)\n", CFS_DURATION_T"s ago)\n",
lock->l_last_activity, lock->l_last_activity,
......
...@@ -170,7 +170,6 @@ int ptlrpc_set_import_discon(struct obd_import *imp, __u32 conn_cnt) ...@@ -170,7 +170,6 @@ int ptlrpc_set_import_discon(struct obd_import *imp, __u32 conn_cnt)
target_len, target_start, target_len, target_start,
libcfs_nid2str(imp->imp_connection->c_peer.nid)); libcfs_nid2str(imp->imp_connection->c_peer.nid));
} }
ptlrpc_deactivate_timeouts(imp);
IMPORT_SET_STATE_NOLOCK(imp, LUSTRE_IMP_DISCON); IMPORT_SET_STATE_NOLOCK(imp, LUSTRE_IMP_DISCON);
spin_unlock(&imp->imp_lock); spin_unlock(&imp->imp_lock);
...@@ -383,7 +382,6 @@ void ptlrpc_activate_import(struct obd_import *imp) ...@@ -383,7 +382,6 @@ void ptlrpc_activate_import(struct obd_import *imp)
spin_lock(&imp->imp_lock); spin_lock(&imp->imp_lock);
imp->imp_invalid = 0; imp->imp_invalid = 0;
ptlrpc_activate_timeouts(imp);
spin_unlock(&imp->imp_lock); spin_unlock(&imp->imp_lock);
obd_import_event(obd, imp, IMP_EVENT_ACTIVE); obd_import_event(obd, imp, IMP_EVENT_ACTIVE);
} }
......
...@@ -141,9 +141,6 @@ static inline int ptlrpc_next_reconnect(struct obd_import *imp) ...@@ -141,9 +141,6 @@ static inline int ptlrpc_next_reconnect(struct obd_import *imp)
return cfs_time_shift(obd_timeout); 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) cfs_duration_t pinger_check_timeout(cfs_time_t time)
{ {
struct timeout_item *item; struct timeout_item *item;
...@@ -163,67 +160,6 @@ cfs_duration_t pinger_check_timeout(cfs_time_t time) ...@@ -163,67 +160,6 @@ cfs_duration_t pinger_check_timeout(cfs_time_t time)
cfs_time_current()); 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; static bool ir_up;
void ptlrpc_pinger_ir_up(void) void ptlrpc_pinger_ir_up(void)
...@@ -378,7 +314,6 @@ int ptlrpc_start_pinger(void) ...@@ -378,7 +314,6 @@ int ptlrpc_start_pinger(void)
return -EALREADY; return -EALREADY;
init_waitqueue_head(&pinger_thread.t_ctl_waitq); init_waitqueue_head(&pinger_thread.t_ctl_waitq);
init_waitqueue_head(&suspend_timeouts_waitq);
strcpy(pinger_thread.t_name, "ll_ping"); strcpy(pinger_thread.t_name, "ll_ping");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment