Commit 7112574a authored by Shraddha Barke's avatar Shraddha Barke Committed by Greg Kroah-Hartman

Staging: lustre: obdclass: Remove unused functions

Remove dump_exports and print_export_data as they are defined
but not used anywhere.
Signed-off-by: default avatarShraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 96135461
...@@ -113,7 +113,6 @@ struct obd_device *class_incref(struct obd_device *obd, ...@@ -113,7 +113,6 @@ struct obd_device *class_incref(struct obd_device *obd,
const char *scope, const void *source); const char *scope, const void *source);
void class_decref(struct obd_device *obd, void class_decref(struct obd_device *obd,
const char *scope, const void *source); const char *scope, const void *source);
void dump_exports(struct obd_device *obd, int locks);
int class_config_llog_handler(const struct lu_env *env, int class_config_llog_handler(const struct lu_env *env,
struct llog_handle *handle, struct llog_handle *handle,
struct llog_rec_hdr *rec, void *data); struct llog_rec_hdr *rec, void *data);
......
...@@ -56,8 +56,6 @@ static spinlock_t obd_zombie_impexp_lock; ...@@ -56,8 +56,6 @@ static spinlock_t obd_zombie_impexp_lock;
static void obd_zombie_impexp_notify(void); static void obd_zombie_impexp_notify(void);
static void obd_zombie_export_add(struct obd_export *exp); static void obd_zombie_export_add(struct obd_export *exp);
static void obd_zombie_import_add(struct obd_import *imp); static void obd_zombie_import_add(struct obd_import *imp);
static void print_export_data(struct obd_export *exp,
const char *status, int locks);
int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c); int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c);
EXPORT_SYMBOL(ptlrpc_put_connection_superhack); EXPORT_SYMBOL(ptlrpc_put_connection_superhack);
...@@ -1120,55 +1118,6 @@ void (*class_export_dump_hook)(struct obd_export *) = NULL; ...@@ -1120,55 +1118,6 @@ void (*class_export_dump_hook)(struct obd_export *) = NULL;
EXPORT_SYMBOL(class_export_dump_hook); EXPORT_SYMBOL(class_export_dump_hook);
#endif #endif
static void print_export_data(struct obd_export *exp, const char *status,
int locks)
{
struct ptlrpc_reply_state *rs;
struct ptlrpc_reply_state *first_reply = NULL;
int nreplies = 0;
spin_lock(&exp->exp_lock);
list_for_each_entry(rs, &exp->exp_outstanding_replies,
rs_exp_list) {
if (nreplies == 0)
first_reply = rs;
nreplies++;
}
spin_unlock(&exp->exp_lock);
CDEBUG(D_HA, "%s: %s %p %s %s %d (%d %d %d) %d %d %d: %p %s %llu\n",
exp->exp_obd->obd_name, status, exp, exp->exp_client_uuid.uuid,
obd_export_nid2str(exp), atomic_read(&exp->exp_refcount),
atomic_read(&exp->exp_rpc_count),
atomic_read(&exp->exp_cb_count),
atomic_read(&exp->exp_locks_count),
exp->exp_disconnected, exp->exp_failed,
nreplies, first_reply, nreplies > 3 ? "..." : "",
exp->exp_last_committed);
#if LUSTRE_TRACKS_LOCK_EXP_REFS
if (locks && class_export_dump_hook != NULL)
class_export_dump_hook(exp);
#endif
}
void dump_exports(struct obd_device *obd, int locks)
{
struct obd_export *exp;
spin_lock(&obd->obd_dev_lock);
list_for_each_entry(exp, &obd->obd_exports, exp_obd_chain)
print_export_data(exp, "ACTIVE", locks);
list_for_each_entry(exp, &obd->obd_unlinked_exports, exp_obd_chain)
print_export_data(exp, "UNLINKED", locks);
list_for_each_entry(exp, &obd->obd_delayed_exports, exp_obd_chain)
print_export_data(exp, "DELAYED", locks);
spin_unlock(&obd->obd_dev_lock);
spin_lock(&obd_zombie_impexp_lock);
list_for_each_entry(exp, &obd_zombie_exports, exp_obd_chain)
print_export_data(exp, "ZOMBIE", locks);
spin_unlock(&obd_zombie_impexp_lock);
}
EXPORT_SYMBOL(dump_exports);
/* Total amount of zombies to be destroyed */ /* Total amount of zombies to be destroyed */
static int zombies_count; static int zombies_count;
......
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