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

staging/lustre/ptlrpc: Remove ptlrpc_update_export_timer()



This is only used on the server to keep track of alive clients
and feeds into ping evictor (that was removed from the client code).
Also remove struct obd's obd_exports_timed and
struct obd_export's exp_obd_chain_timed used to keep track of that

Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fb209cbd
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -148,13 +148,6 @@ struct obd_export {
	struct list_head		exp_obd_chain;
	struct hlist_node	  exp_uuid_hash; /** uuid-export hash*/
	struct hlist_node	  exp_nid_hash; /** nid-export hash */
	/**
	 * All exports eligible for ping evictor are linked into a list
	 * through this field in "most time since last request on this export"
	 * order
	 * protected by obd_dev_lock
	 */
	struct list_head		exp_obd_chain_timed;
	/** Obd device of this export */
	struct obd_device	*exp_obd;
	/**
@@ -179,8 +172,6 @@ struct obd_export {
	spinlock_t		  exp_uncommitted_replies_lock;
	/** Last committed transno for this export */
	__u64		     exp_last_committed;
	/** When was last request received */
	unsigned long		exp_last_request_time;
	/** On replay all requests waiting for replay are linked here */
	struct list_head		exp_req_replay_queue;
	/**
@@ -265,13 +256,6 @@ static inline int exp_connect_multibulk(struct obd_export *exp)
	return exp_max_brw_size(exp) > ONE_MB_BRW_SIZE;
}

static inline int exp_expired(struct obd_export *exp, long age)
{
	LASSERT(exp->exp_delayed);
	return time_before(cfs_time_add(exp->exp_last_request_time, age),
			   get_seconds());
}

static inline int exp_connect_cancelset(struct obd_export *exp)
{
	LASSERT(exp != NULL);
+0 −2
Original line number Diff line number Diff line
@@ -777,8 +777,6 @@ struct obd_device {
	struct rw_semaphore	obd_observer_link_sem;
	struct obd_notify_upcall obd_upcall;
	struct obd_export       *obd_self_export;
	/* list of exports in LRU order, for ping evictor, with obd_dev_lock */
	struct list_head	      obd_exports_timed;

	int			      obd_max_recoverable_clients;
	atomic_t		     obd_connected_clients;
+0 −4
Original line number Diff line number Diff line
@@ -846,7 +846,6 @@ struct obd_export *class_new_export(struct obd_device *obd,
	INIT_LIST_HEAD(&export->exp_handle.h_link);
	INIT_LIST_HEAD(&export->exp_hp_rpcs);
	class_handle_hash(&export->exp_handle, &export_handle_ops);
	export->exp_last_request_time = get_seconds();
	spin_lock_init(&export->exp_lock);
	spin_lock_init(&export->exp_rpc_lock);
	INIT_HLIST_NODE(&export->exp_uuid_hash);
@@ -892,8 +891,6 @@ struct obd_export *class_new_export(struct obd_device *obd,

	class_incref(obd, "export", export);
	list_add(&export->exp_obd_chain, &export->exp_obd->obd_exports);
	list_add_tail(&export->exp_obd_chain_timed,
			  &export->exp_obd->obd_exports_timed);
	export->exp_obd->obd_num_exports++;
	spin_unlock(&obd->obd_dev_lock);
	cfs_hash_putref(hash);
@@ -924,7 +921,6 @@ void class_unlink_export(struct obd_export *exp)
			     &exp->exp_uuid_hash);

	list_move(&exp->exp_obd_chain, &exp->exp_obd->obd_unlinked_exports);
	list_del_init(&exp->exp_obd_chain_timed);
	exp->exp_obd->obd_num_exports--;
	spin_unlock(&exp->exp_obd->obd_dev_lock);
	class_export_put(exp);
+0 −2
Original line number Diff line number Diff line
@@ -381,7 +381,6 @@ int class_attach(struct lustre_cfg *lcfg)
	INIT_LIST_HEAD(&obd->obd_exports);
	INIT_LIST_HEAD(&obd->obd_unlinked_exports);
	INIT_LIST_HEAD(&obd->obd_delayed_exports);
	INIT_LIST_HEAD(&obd->obd_exports_timed);
	spin_lock_init(&obd->obd_nid_lock);
	spin_lock_init(&obd->obd_dev_lock);
	mutex_init(&obd->obd_dev_mutex);
@@ -518,7 +517,6 @@ int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
	}

	obd->obd_self_export = exp;
	list_del_init(&exp->exp_obd_chain_timed);
	class_export_put(exp);

	err = obd_setup(obd, lcfg);
+0 −6
Original line number Diff line number Diff line
@@ -2065,12 +2065,6 @@ static int echo_client_setup(const struct lu_env *env,
	ocd->ocd_group = FID_SEQ_ECHO;

	rc = obd_connect(env, &ec->ec_exp, tgt, &echo_uuid, ocd, NULL);
	if (rc == 0) {
		/* Turn off pinger because it connects to tgt obd directly. */
		spin_lock(&tgt->obd_dev_lock);
		list_del_init(&ec->ec_exp->exp_obd_chain_timed);
		spin_unlock(&tgt->obd_dev_lock);
	}

	kfree(ocd);

Loading