* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2013, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#define DEBUG_SUBSYSTEM S_RPC
+#include <linux/kthread.h>
#include <obd_support.h>
#include <obd_class.h>
#include "ptlrpc_internal.h"
}
EXPORT_SYMBOL(ptlrpc_obd_ping);
-int ptlrpc_ping(struct obd_import *imp)
+static int ptlrpc_ping(struct obd_import *imp)
{
struct ptlrpc_request *req;
ENTRY;
RETURN(0);
}
-void ptlrpc_update_next_ping(struct obd_import *imp, int soon)
+static void ptlrpc_update_next_ping(struct obd_import *imp, int soon)
{
#ifdef ENABLE_PINGER
int time = soon ? PING_INTERVAL_SHORT : PING_INTERVAL;
return cfs_time_shift(obd_timeout);
}
-cfs_duration_t pinger_check_timeout(cfs_time_t time)
+static cfs_duration_t pinger_check_timeout(cfs_time_t time)
{
struct timeout_item *item;
cfs_time_t timeout = PING_INTERVAL;
- /* The timeout list is a increase order sorted list */
+ /* This list is sorted in increasing timeout order */
mutex_lock(&pinger_mutex);
list_for_each_entry(item, &timeout_list, ti_chain) {
- int ti_timeout = item->ti_timeout;
- if (timeout > ti_timeout)
- timeout = ti_timeout;
- break;
- }
+ int ti_timeout = item->ti_timeout;
+ if (timeout > ti_timeout)
+ timeout = ti_timeout;
+ break;
+ }
mutex_unlock(&pinger_mutex);
return cfs_time_sub(cfs_time_add(time, cfs_time_seconds(timeout)),
{
ptlrpc_update_next_ping(imp, 0);
}
-EXPORT_SYMBOL(ptlrpc_pinger_sending_on_import);
void ptlrpc_pinger_commit_expected(struct obd_import *imp)
{
* Register a timeout callback to the pinger list, and the callback will
* be called when timeout happens.
*/
-struct timeout_item* ptlrpc_new_timeout(int time, enum timeout_event event,
- timeout_cb_t cb, void *data)
+static struct timeout_item *ptlrpc_new_timeout(int time,
+ enum timeout_event event,
+ timeout_cb_t cb, void *data)
{
struct timeout_item *ti;
static int pet_refcount = 0;
static int pet_state;
static wait_queue_head_t pet_waitq;
-struct list_head pet_list;
+static struct list_head pet_list;
static DEFINE_SPINLOCK(pet_lock);
int ping_evictor_wake(struct obd_export *exp)