Staging: lustre: obdclass: Remove unused functions
authorShraddha Barke <shraddha.6596@gmail.com>
Fri, 2 Oct 2015 12:37:04 +0000 (18:07 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 07:47:55 +0000 (08:47 +0100)
Remove dump_exports and print_export_data as they are defined
but not used anywhere.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/obd_class.h
drivers/staging/lustre/lustre/obdclass/genops.c

index 2cd445821251d0e03d369b1db31dcdfd7b72e301..882d47728781f7a85d05d0fc1938ddfffe71b86d 100644 (file)
@@ -113,7 +113,6 @@ struct obd_device *class_incref(struct obd_device *obd,
                                const char *scope, const void *source);
 void class_decref(struct obd_device *obd,
                  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,
                              struct llog_handle *handle,
                              struct llog_rec_hdr *rec, void *data);
index 2ae0ea903be04f7326f9aa00b76d5fed31018426..a22b83ec9a3d236da6a10460b35b66dda365b32b 100644 (file)
@@ -56,8 +56,6 @@ static spinlock_t  obd_zombie_impexp_lock;
 static void obd_zombie_impexp_notify(void);
 static void obd_zombie_export_add(struct obd_export *exp);
 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);
 EXPORT_SYMBOL(ptlrpc_put_connection_superhack);
@@ -1120,55 +1118,6 @@ void (*class_export_dump_hook)(struct obd_export *) = NULL;
 EXPORT_SYMBOL(class_export_dump_hook);
 #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 */
 static int zombies_count;