From 44d48c39820fc66947fae947269a6e2fe4e10cb9 Mon Sep 17 00:00:00 2001 From: Li Wei Date: Tue, 5 Feb 2013 15:30:40 +0800 Subject: [PATCH] LU-2467 ptlrpc: Fix an unideal symbol export The "suppress_pings" symbol is a little bit too short to export. This patch exports a function, ptlrpc_pinger_suppress_pings(), instead. Change-Id: Ifdcf5d2459baa7ae2709572a2fd4d02b72e440df Signed-off-by: Li Wei Reviewed-on: http://review.whamcloud.com/5270 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Emoly Liu Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin --- lustre/include/lustre_net.h | 2 +- lustre/mdt/mdt_handler.c | 2 +- lustre/ofd/ofd_obd.c | 2 +- lustre/ptlrpc/pinger.c | 9 +++++++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index da2e1cc..c5f5d86 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -3129,7 +3129,6 @@ int server_disconnect_export(struct obd_export *exp); * Pinger API (client side only) * @{ */ -extern int suppress_pings; enum timeout_event { TIMEOUT_GRANT = 1 }; @@ -3154,6 +3153,7 @@ void ping_evictor_stop(void); #endif int ptlrpc_check_and_wait_suspend(struct ptlrpc_request *req); /** @} */ +int ptlrpc_pinger_suppress_pings(void); /* ptlrpc daemon bind policy */ typedef enum { diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 3576847..ccf86c1 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -5184,7 +5184,7 @@ static int mdt_connect_internal(struct obd_export *exp, } if (data->ocd_connect_flags & OBD_CONNECT_PINGLESS) { - if (suppress_pings) { + if (ptlrpc_pinger_suppress_pings()) { spin_lock(&exp->exp_obd->obd_dev_lock); list_del_init(&exp->exp_obd_chain_timed); spin_unlock(&exp->exp_obd->obd_dev_lock); diff --git a/lustre/ofd/ofd_obd.c b/lustre/ofd/ofd_obd.c index 7fec077..737c6f0 100644 --- a/lustre/ofd/ofd_obd.c +++ b/lustre/ofd/ofd_obd.c @@ -227,7 +227,7 @@ static int ofd_parse_connect_data(const struct lu_env *env, data->ocd_maxbytes = ofd->ofd_dt_conf.ddp_maxbytes; if (data->ocd_connect_flags & OBD_CONNECT_PINGLESS) { - if (suppress_pings) { + if (ptlrpc_pinger_suppress_pings()) { spin_lock(&exp->exp_obd->obd_dev_lock); list_del_init(&exp->exp_obd_chain_timed); spin_unlock(&exp->exp_obd->obd_dev_lock); diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index f5bf639..b19e96e 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -48,14 +48,19 @@ #include #include "ptlrpc_internal.h" -int suppress_pings; -EXPORT_SYMBOL(suppress_pings); +static int suppress_pings; CFS_MODULE_PARM(suppress_pings, "i", int, 0644, "Suppress pings"); struct mutex pinger_mutex; static CFS_LIST_HEAD(pinger_imports); static cfs_list_t timeout_list = CFS_LIST_HEAD_INIT(timeout_list); +int ptlrpc_pinger_suppress_pings() +{ + return suppress_pings; +} +EXPORT_SYMBOL(ptlrpc_pinger_suppress_pings); + struct ptlrpc_request * ptlrpc_prep_ping(struct obd_import *imp) { -- 1.8.3.1