Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9528a30 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman
Browse files

staging/lustre/obd: Remove nid_stats tracking



This nid_stats tracking only makes sense on the server side,
on the client there are no other clients to keep track of anyway.

Signed-off-by: default avatarDmitry Eremin <dmiter4ever@gmail.com>
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ade9fb1e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@
#include "../../include/linux/libcfs/libcfs.h"

struct seq_file;
struct proc_dir_entry;
struct lustre_cfg;

struct thandle;
+0 −15
Original line number Diff line number Diff line
@@ -558,7 +558,6 @@ extern void lprocfs_counter_init(struct lprocfs_stats *stats, int index,
extern void lprocfs_free_obd_stats(struct obd_device *obddev);
extern void lprocfs_free_md_stats(struct obd_device *obddev);
struct obd_export;
struct nid_stat;
extern int lprocfs_add_clear_entry(struct obd_device *obd,
				   struct proc_dir_entry *entry);
extern int lprocfs_exp_cleanup(struct obd_export *exp);
@@ -573,11 +572,6 @@ extern struct proc_dir_entry *lprocfs_add_simple(struct proc_dir_entry *root,
extern struct dentry *
ldebugfs_add_symlink(const char *name, struct dentry *parent,
		    const char *format, ...);
extern void lprocfs_free_per_client_stats(struct obd_device *obd);
extern int
lprocfs_nid_stats_clear_write(struct file *file, const char *buffer,
			      unsigned long count, void *data);
extern int lprocfs_nid_stats_clear_read(struct seq_file *m, void *data);

extern int ldebugfs_register_stats(struct dentry *parent,
				   const char *name,
@@ -909,15 +903,6 @@ static inline struct proc_dir_entry *
lprocfs_add_simple(struct proc_dir_entry *root, char *name,
		   void *data, struct file_operations *fops)
{return 0; }
static inline void lprocfs_free_per_client_stats(struct obd_device *obd)
{ return; }
static inline
int lprocfs_nid_stats_clear_write(struct file *file, const char *buffer,
				  unsigned long count, void *data)
{return count;}
static inline
int lprocfs_nid_stats_clear_read(struct seq_file *m, void *data)
{ return 0; }

static inline struct proc_dir_entry *
lprocfs_register(const char *name, struct proc_dir_entry *parent,
+0 −2
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@
#include "lu_ref.h"

struct seq_file;
struct proc_dir_entry;
struct lustre_cfg;
struct lprocfs_stats;

@@ -277,7 +276,6 @@ struct lu_device {
	 * Stack this device belongs to.
	 */
	struct lu_site		    *ld_site;
	struct proc_dir_entry	     *ld_proc_entry;

	/** \todo XXX: temporary back pointer into obd. */
	struct obd_device		 *ld_obd;
+0 −29
Original line number Diff line number Diff line
@@ -106,34 +106,6 @@ struct mgs_export_data {
	spinlock_t		med_lock;	/* protect med_clients */
};

/**
 * per-NID statistics structure.
 * It tracks access patterns to this export on a per-client-NID basis
 */
struct nid_stat {
	lnet_nid_t	       nid;
	struct hlist_node	 nid_hash;
	struct list_head	       nid_list;
	struct obd_device       *nid_obd;
	struct proc_dir_entry   *nid_proc;
	struct lprocfs_stats    *nid_stats;
	struct lprocfs_stats    *nid_ldlm_stats;
	atomic_t	     nid_exp_ref_count; /* for obd_nid_stats_hash
							   exp_nid_stats */
};

#define nidstat_getref(nidstat)						\
do {									   \
	atomic_inc(&(nidstat)->nid_exp_ref_count);			 \
} while (0)

#define nidstat_putref(nidstat)						\
do {									   \
	atomic_dec(&(nidstat)->nid_exp_ref_count);			 \
	LASSERTF(atomic_read(&(nidstat)->nid_exp_ref_count) >= 0,	  \
		 "stat %p nid_exp_ref_count < 0\n", nidstat);		  \
} while (0)

enum obd_option {
	OBD_OPT_FORCE =	 0x0001,
	OBD_OPT_FAILOVER =      0x0002,
@@ -190,7 +162,6 @@ struct obd_export {
	 * exp_lock protect its change
	 */
	struct obd_import	*exp_imp_reverse;
	struct nid_stat	  *exp_nid_stats;
	struct lprocfs_stats     *exp_md_stats;
	/** Active connection */
	struct ptlrpc_connection *exp_connection;
+0 −3
Original line number Diff line number Diff line
@@ -845,9 +845,6 @@ struct obd_device {
	struct cfs_hash	     *obd_uuid_hash;
	/* nid-export hash body */
	struct cfs_hash	     *obd_nid_hash;
	/* nid stats body */
	struct cfs_hash	     *obd_nid_stats_hash;
	struct list_head	      obd_nid_stats;
	atomic_t	    obd_refcount;
	wait_queue_head_t	     obd_refcount_waitq;
	struct list_head	      obd_exports;
Loading