All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: lustre-devel@lists.lustre.org
Subject: [lustre-devel] [PATCH 045/151] lustre: osc: common client setup/cleanup
Date: Mon, 30 Sep 2019 14:55:04 -0400	[thread overview]
Message-ID: <1569869810-23848-46-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1569869810-23848-1-git-send-email-jsimmons@infradead.org>

From: Mikhal Pershin <mpershin@whamcloud.com>

Make OSC code related to client setup/cleanup common for
both OSB and MDC. Add new events in mdc_import_event().

WC-bug-id: https://jira.whamcloud.com/browse/LU-3285
Lustre-commit: a1bd0f62ee08 ("LU-3285 osc: common client setup/cleanup")
Signed-off-by: Mikhal Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/28014
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@gmail.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/include/lustre_osc.h | 30 +++++++++++++--
 fs/lustre/include/obd.h        |  4 ++
 fs/lustre/ldlm/ldlm_lib.c      |  3 ++
 fs/lustre/mdc/mdc_request.c    | 59 +++++++++++++----------------
 fs/lustre/obdclass/genops.c    | 22 +++++------
 fs/lustre/osc/osc_cache.c      | 17 ++-------
 fs/lustre/osc/osc_internal.h   |  1 +
 fs/lustre/osc/osc_object.c     |  2 +-
 fs/lustre/osc/osc_request.c    | 85 +++++++++++++++++++++++++++---------------
 9 files changed, 130 insertions(+), 93 deletions(-)

diff --git a/fs/lustre/include/lustre_osc.h b/fs/lustre/include/lustre_osc.h
index f14ae85..5723261 100644
--- a/fs/lustre/include/lustre_osc.h
+++ b/fs/lustre/include/lustre_osc.h
@@ -51,6 +51,7 @@
 
 #include <obd.h>
 #include <cl_object.h>
+#include <linux/libcfs/libcfs_hash.h>
 
 struct osc_quota_info {
 	/* linkage for quota hash table */
@@ -479,9 +480,23 @@ int osc_cache_writeback_range(const struct lu_env *env, struct osc_object *obj,
 			      pgoff_t start, pgoff_t end, int hp, int discard);
 int osc_cache_wait_range(const struct lu_env *env, struct osc_object *obj,
 			 pgoff_t start, pgoff_t end);
-void osc_io_unplug(const struct lu_env *env, struct client_obd *cli,
-		   struct osc_object *osc);
-int lru_queue_work(const struct lu_env *env, void *data);
+
+int __osc_io_unplug(const struct lu_env *env, struct client_obd *cli,
+		    struct osc_object *osc, int async);
+
+static inline int osc_io_unplug_async(const struct lu_env *env,
+				      struct client_obd *cli,
+				      struct osc_object *osc)
+{
+	return __osc_io_unplug(env, cli, osc, 1);
+}
+
+static inline void osc_io_unplug(const struct lu_env *env,
+				 struct client_obd *cli,
+				 struct osc_object *osc)
+{
+	(void)__osc_io_unplug(env, cli, osc, 0);
+}
 
 void osc_object_set_contended(struct osc_object *obj);
 void osc_object_clear_contended(struct osc_object *obj);
@@ -511,9 +526,18 @@ int osc_attr_update(const struct lu_env *env, struct cl_object *obj,
 		    const struct cl_attr *attr, unsigned int valid);
 int osc_object_glimpse(const struct lu_env *env, const struct cl_object *obj,
 		       struct ost_lvb *lvb);
+int osc_object_invalidate(const struct lu_env *env, struct osc_object *osc);
 
 /* osc_request.c */
 void osc_init_grant(struct client_obd *cli, struct obd_connect_data *ocd);
+int osc_setup_common(struct obd_device *obd, struct lustre_cfg *lcfg);
+int osc_precleanup_common(struct obd_device *obd);
+int osc_cleanup_common(struct obd_device *obd);
+int osc_set_info_async(const struct lu_env *env, struct obd_export *exp,
+		       u32 keylen, void *key, u32 vallen, void *val,
+		       struct ptlrpc_request_set *set);
+int osc_ldlm_resource_invalidate(struct cfs_hash *hs, struct cfs_hash_bd *bd,
+				 struct hlist_node *hnode, void *arg);
 
 /****************************************************************************
  *
diff --git a/fs/lustre/include/obd.h b/fs/lustre/include/obd.h
index baa97a9..62a8ea9 100644
--- a/fs/lustre/include/obd.h
+++ b/fs/lustre/include/obd.h
@@ -316,6 +316,10 @@ struct client_obd {
 	atomic_t		cl_mgc_refcount;
 	struct obd_export      *cl_mgc_mgsexp;
 
+	/* in-flight control list and total RPCs counter */
+	struct list_head	 cl_flight_waiters;
+	u32			 cl_rpcs_in_flight;
+
 	/* checksumming for data sent over the network */
 	unsigned int		cl_checksum:1,	/* 0 = disabled, 1 = enabled */
 				cl_checksum_dump:1; /* same */
diff --git a/fs/lustre/ldlm/ldlm_lib.c b/fs/lustre/ldlm/ldlm_lib.c
index 67f3297..3a7b3fb 100644
--- a/fs/lustre/ldlm/ldlm_lib.c
+++ b/fs/lustre/ldlm/ldlm_lib.c
@@ -351,6 +351,9 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg)
 	atomic_long_set(&cli->cl_unstable_count, 0);
 	INIT_LIST_HEAD(&cli->cl_shrink_list);
 
+	INIT_LIST_HEAD(&cli->cl_flight_waiters);
+	cli->cl_rpcs_in_flight = 0;
+
 	init_waitqueue_head(&cli->cl_destroy_waitq);
 	atomic_set(&cli->cl_destroy_in_flight, 0);
 	/* Turn on checksumming by default. */
diff --git a/fs/lustre/mdc/mdc_request.c b/fs/lustre/mdc/mdc_request.c
index 96e0d0a..85eb0ec 100644
--- a/fs/lustre/mdc/mdc_request.c
+++ b/fs/lustre/mdc/mdc_request.c
@@ -2242,14 +2242,6 @@ static int mdc_set_info_async(const struct lu_env *env,
 		return do_set_info_async(imp, MDS_SET_INFO, LUSTRE_MDS_VERSION,
 					 keylen, key, vallen, val, set);
 	}
-	if (KEY_IS(KEY_SPTLRPC_CONF)) {
-		sptlrpc_conf_client_adapt(exp->exp_obd);
-		return 0;
-	}
-	if (KEY_IS(KEY_FLUSH_CTX)) {
-		sptlrpc_import_flush_my_ctx(imp);
-		return 0;
-	}
 	if (KEY_IS(KEY_CHANGELOG_CLEAR)) {
 		rc = do_set_info_async(imp, MDS_SET_INFO, LUSTRE_MDS_VERSION,
 				       keylen, key, vallen, val, set);
@@ -2266,13 +2258,7 @@ static int mdc_set_info_async(const struct lu_env *env,
 		return 0;
 	}
 
-	/* TODO: these OSC-related keys are ignored for now */
-	if (KEY_IS(KEY_CHECKSUM) || KEY_IS(KEY_CACHE_SET) ||
-	    KEY_IS(KEY_CACHE_LRU_SHRINK) || KEY_IS(KEY_GRANT_SHRINK))
-		return 0;
-
-	CERROR("%s: Unknown key %s\n", exp->exp_obd->obd_name, (char *)key);
-	return -EINVAL;
+	return osc_set_info_async(env, exp, keylen, key, vallen, val, set);
 }
 
 static int mdc_get_info(const struct lu_env *env, struct obd_export *exp,
@@ -2350,22 +2336,19 @@ static int mdc_fsync(struct obd_export *exp, const struct lu_fid *fid,
 static int mdc_import_event(struct obd_device *obd, struct obd_import *imp,
 			    enum obd_import_event event)
 {
+	struct client_obd *cli = &obd->u.cli;
 	int rc = 0;
 
 	LASSERT(imp->imp_obd == obd);
 
 	switch (event) {
-	case IMP_EVENT_DISCON: {
-		struct client_obd *cli = &obd->u.cli;
-
+	case IMP_EVENT_DISCON:
 		spin_lock(&cli->cl_loi_list_lock);
 		cli->cl_avail_grant = 0;
 		cli->cl_lost_grant = 0;
 		spin_unlock(&cli->cl_loi_list_lock);
 		break;
-	}
-	case IMP_EVENT_INACTIVE: {
-		struct client_obd *cli = &obd->u.cli;
+	case IMP_EVENT_INACTIVE:
 		/*
 		 * Flush current sequence to make client obtain new one
 		 * from server in case of disconnect/reconnect.
@@ -2377,12 +2360,28 @@ static int mdc_import_event(struct obd_device *obd, struct obd_import *imp,
 
 		rc = obd_notify_observer(obd, obd, OBD_NOTIFY_INACTIVE);
 		break;
-	}
 	case IMP_EVENT_INVALIDATE: {
 		struct ldlm_namespace *ns = obd->obd_namespace;
+		struct lu_env *env;
+		u16 refcheck;
 
 		ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY);
 
+		env = cl_env_get(&refcheck);
+		if (!IS_ERR(env)) {
+			/* Reset grants. All pages go to failing rpcs due to
+			 * the invalid import.
+			 */
+			osc_io_unplug(env, cli, NULL);
+
+			cfs_hash_for_each_nolock(ns->ns_rs_hash,
+						 osc_ldlm_resource_invalidate,
+						 env, 0);
+			cl_env_put(env, &refcheck);
+			ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY);
+		} else {
+			rc = PTR_ERR(env);
+		}
 		break;
 	}
 	case IMP_EVENT_ACTIVE:
@@ -2398,7 +2397,7 @@ static int mdc_import_event(struct obd_device *obd, struct obd_import *imp,
 		struct obd_connect_data *ocd = &imp->imp_connect_data;
 
 		if (OCD_HAS_FLAG(ocd, GRANT))
-			osc_init_grant(&obd->u.cli, ocd);
+			osc_init_grant(cli, ocd);
 
 		rc = obd_notify_observer(obd, obd, OBD_NOTIFY_OCD);
 		break;
@@ -2497,14 +2496,10 @@ int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg)
 {
 	int rc;
 
-	rc = ptlrpcd_addref();
+	rc = osc_setup_common(obd, cfg);
 	if (rc < 0)
 		return rc;
 
-	rc = client_obd_setup(obd, cfg);
-	if (rc)
-		goto err_ptlrpcd_decref;
-
 	rc = mdc_tunables_init(obd);
 	if (rc)
 		goto err_osc_cleanup;
@@ -2536,8 +2531,6 @@ int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg)
 	ptlrpc_lprocfs_unregister_obd(obd);
 err_osc_cleanup:
 	client_obd_cleanup(obd);
-err_ptlrpcd_decref:
-	ptlrpcd_decref();
 	return rc;
 }
 
@@ -2565,6 +2558,8 @@ static int mdc_init_ea_size(struct obd_export *exp, u32 easize, u32 def_easize)
 
 static int mdc_precleanup(struct obd_device *obd)
 {
+	osc_precleanup_common(obd);
+
 	/* Failsafe, ok if racy */
 	if (atomic_read(&obd->obd_type->typ_refcnt) <= 1)
 		libcfs_kkuc_group_rem(0, KUC_GRP_HSM);
@@ -2581,9 +2576,7 @@ static int mdc_precleanup(struct obd_device *obd)
 
 static int mdc_cleanup(struct obd_device *obd)
 {
-	ptlrpcd_decref();
-
-	return client_obd_cleanup(obd);
+	return osc_cleanup_common(obd);
 }
 
 int mdc_process_config(struct obd_device *obd, u32 len, void *buf)
diff --git a/fs/lustre/obdclass/genops.c b/fs/lustre/obdclass/genops.c
index 4b528a7..68d267f 100644
--- a/fs/lustre/obdclass/genops.c
+++ b/fs/lustre/obdclass/genops.c
@@ -1291,14 +1291,14 @@ int obd_get_request_slot(struct client_obd *cli)
 	int rc;
 
 	spin_lock(&cli->cl_loi_list_lock);
-	if (cli->cl_r_in_flight < cli->cl_max_rpcs_in_flight) {
-		cli->cl_r_in_flight++;
+	if (cli->cl_rpcs_in_flight < cli->cl_max_rpcs_in_flight) {
+		cli->cl_rpcs_in_flight++;
 		spin_unlock(&cli->cl_loi_list_lock);
 		return 0;
 	}
 
 	init_waitqueue_head(&orsw.orsw_waitq);
-	list_add_tail(&orsw.orsw_entry, &cli->cl_loi_read_list);
+	list_add_tail(&orsw.orsw_entry, &cli->cl_flight_waiters);
 	orsw.orsw_signaled = false;
 	spin_unlock(&cli->cl_loi_list_lock);
 
@@ -1314,7 +1314,7 @@ int obd_get_request_slot(struct client_obd *cli)
 	if (rc) {
 		if (!orsw.orsw_signaled) {
 			if (list_empty(&orsw.orsw_entry))
-				cli->cl_r_in_flight--;
+				cli->cl_rpcs_in_flight--;
 			else
 				list_del(&orsw.orsw_entry);
 		}
@@ -1336,16 +1336,16 @@ void obd_put_request_slot(struct client_obd *cli)
 	struct obd_request_slot_waiter *orsw;
 
 	spin_lock(&cli->cl_loi_list_lock);
-	cli->cl_r_in_flight--;
+	cli->cl_rpcs_in_flight--;
 
 	/* If there is free slot, wakeup the first waiter. */
-	if (!list_empty(&cli->cl_loi_read_list) &&
-	    likely(cli->cl_r_in_flight < cli->cl_max_rpcs_in_flight)) {
-		orsw = list_first_entry(&cli->cl_loi_read_list,
+	if (!list_empty(&cli->cl_flight_waiters) &&
+	    likely(cli->cl_rpcs_in_flight < cli->cl_max_rpcs_in_flight)) {
+		orsw = list_first_entry(&cli->cl_flight_waiters,
 					struct obd_request_slot_waiter,
 					orsw_entry);
 		list_del_init(&orsw->orsw_entry);
-		cli->cl_r_in_flight++;
+		cli->cl_rpcs_in_flight++;
 		wake_up(&orsw->orsw_waitq);
 	}
 	spin_unlock(&cli->cl_loi_list_lock);
@@ -1395,14 +1395,14 @@ int obd_set_max_rpcs_in_flight(struct client_obd *cli, u32 max)
 
 	/* We increase the max_rpcs_in_flight, then wakeup some waiters. */
 	for (i = 0; i < diff; i++) {
-		orsw = list_first_entry_or_null(&cli->cl_loi_read_list,
+		orsw = list_first_entry_or_null(&cli->cl_flight_waiters,
 						struct obd_request_slot_waiter,
 						orsw_entry);
 		if (!orsw)
 			break;
 
 		list_del_init(&orsw->orsw_entry);
-		cli->cl_r_in_flight++;
+		cli->cl_rpcs_in_flight++;
 		wake_up(&orsw->orsw_waitq);
 	}
 	spin_unlock(&cli->cl_loi_list_lock);
diff --git a/fs/lustre/osc/osc_cache.c b/fs/lustre/osc/osc_cache.c
index 1d06654..65fdbc1 100644
--- a/fs/lustre/osc/osc_cache.c
+++ b/fs/lustre/osc/osc_cache.c
@@ -2260,8 +2260,8 @@ static void osc_check_rpcs(const struct lu_env *env, struct client_obd *cli)
 	spin_unlock(&cli->cl_loi_list_lock);
 }
 
-static int __osc_io_unplug(const struct lu_env *env, struct client_obd *cli,
-			   struct osc_object *osc, int async)
+int __osc_io_unplug(const struct lu_env *env, struct client_obd *cli,
+		    struct osc_object *osc, int async)
 {
 	int rc = 0;
 
@@ -2278,18 +2278,7 @@ static int __osc_io_unplug(const struct lu_env *env, struct client_obd *cli,
 
 	return rc;
 }
-
-static int osc_io_unplug_async(const struct lu_env *env,
-			       struct client_obd *cli, struct osc_object *osc)
-{
-	return __osc_io_unplug(env, cli, osc, 1);
-}
-
-void osc_io_unplug(const struct lu_env *env, struct client_obd *cli,
-		   struct osc_object *osc)
-{
-	(void)__osc_io_unplug(env, cli, osc, 0);
-}
+EXPORT_SYMBOL(__osc_io_unplug);
 
 int osc_prep_async_page(struct osc_object *osc, struct osc_page *ops,
 			struct page *page, loff_t offset)
diff --git a/fs/lustre/osc/osc_internal.h b/fs/lustre/osc/osc_internal.h
index 72cf131..873556a 100644
--- a/fs/lustre/osc/osc_internal.h
+++ b/fs/lustre/osc/osc_internal.h
@@ -44,6 +44,7 @@
 
 int osc_shrink_grant_to_target(struct client_obd *cli, u64 target_bytes);
 void osc_update_next_shrink(struct client_obd *cli);
+int lru_queue_work(const struct lu_env *env, void *data);
 
 typedef int (*osc_enqueue_upcall_f)(void *cookie, struct lustre_handle *lockh,
 				    int rc);
diff --git a/fs/lustre/osc/osc_object.c b/fs/lustre/osc/osc_object.c
index 9ba3785..d34e6f2 100644
--- a/fs/lustre/osc/osc_object.c
+++ b/fs/lustre/osc/osc_object.c
@@ -462,5 +462,5 @@ int osc_object_invalidate(const struct lu_env *env, struct osc_object *osc)
 
 	return 0;
 }
-
+EXPORT_SYMBOL(osc_object_invalidate);
 /** @} osc */
diff --git a/fs/lustre/osc/osc_request.c b/fs/lustre/osc/osc_request.c
index 96d2c01..e804554 100644
--- a/fs/lustre/osc/osc_request.c
+++ b/fs/lustre/osc/osc_request.c
@@ -737,10 +737,6 @@ static void osc_update_grant(struct client_obd *cli, struct ost_body *body)
 	}
 }
 
-static int osc_set_info_async(const struct lu_env *env, struct obd_export *exp,
-			      u32 keylen, void *key, u32 vallen,
-			      void *val, struct ptlrpc_request_set *set);
-
 static int osc_shrink_grant_interpret(const struct lu_env *env,
 				      struct ptlrpc_request *req,
 				      void *aa, int rc)
@@ -2524,9 +2520,10 @@ static int osc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 	return err;
 }
 
-static int osc_set_info_async(const struct lu_env *env, struct obd_export *exp,
-			      u32 keylen, void *key, u32 vallen,
-			      void *val, struct ptlrpc_request_set *set)
+int osc_set_info_async(const struct lu_env *env, struct obd_export *exp,
+		       u32 keylen, void *key,
+		       u32 vallen, void *val,
+		       struct ptlrpc_request_set *set)
 {
 	struct ptlrpc_request *req;
 	struct obd_device *obd = exp->exp_obd;
@@ -2642,6 +2639,7 @@ static int osc_set_info_async(const struct lu_env *env, struct obd_export *exp,
 
 	return 0;
 }
+EXPORT_SYMBOL(osc_set_info_async);
 
 static int osc_reconnect(const struct lu_env *env,
 			 struct obd_export *exp, struct obd_device *obd,
@@ -2702,9 +2700,9 @@ static int osc_disconnect(struct obd_export *exp)
 	return rc;
 }
 
-static int osc_ldlm_resource_invalidate(struct cfs_hash *hs,
-					struct cfs_hash_bd *bd,
-					struct hlist_node *hnode, void *arg)
+int osc_ldlm_resource_invalidate(struct cfs_hash *hs,
+				 struct cfs_hash_bd *bd,
+				 struct hlist_node *hnode, void *arg)
 {
 	struct ldlm_resource *res = cfs_hash_object(hs, hnode);
 	struct osc_object *osc = NULL;
@@ -2734,6 +2732,7 @@ static int osc_ldlm_resource_invalidate(struct cfs_hash *hs,
 
 	return 0;
 }
+EXPORT_SYMBOL(osc_ldlm_resource_invalidate);
 
 static int osc_import_event(struct obd_device *obd,
 			    struct obd_import *imp,
@@ -2842,14 +2841,11 @@ static int brw_queue_work(const struct lu_env *env, void *data)
 	return 0;
 }
 
-int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
+int osc_setup_common(struct obd_device *obd, struct lustre_cfg *lcfg)
 {
 	struct client_obd *cli = &obd->u.cli;
 	void *handler;
 	int rc;
-	int adding;
-	int added;
-	int req_count;
 
 	rc = ptlrpcd_addref();
 	if (rc)
@@ -2862,7 +2858,7 @@ int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 	handler = ptlrpcd_alloc_work(cli->cl_import, brw_queue_work, cli);
 	if (IS_ERR(handler)) {
 		rc = PTR_ERR(handler);
-		goto out_client_setup;
+		goto out_ptlrpcd_work;
 	}
 	cli->cl_writeback_work = handler;
 
@@ -2880,6 +2876,37 @@ int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 
 	cli->cl_grant_shrink_interval = GRANT_SHRINK_INTERVAL;
 
+	INIT_LIST_HEAD(&cli->cl_grant_shrink_list);
+	return 0;
+
+out_ptlrpcd_work:
+	if (cli->cl_writeback_work) {
+		ptlrpcd_destroy_work(cli->cl_writeback_work);
+		cli->cl_writeback_work = NULL;
+	}
+	if (cli->cl_lru_work) {
+		ptlrpcd_destroy_work(cli->cl_lru_work);
+		cli->cl_lru_work = NULL;
+	}
+	client_obd_cleanup(obd);
+out_ptlrpcd:
+	ptlrpcd_decref();
+	return rc;
+}
+EXPORT_SYMBOL(osc_setup_common);
+
+int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
+{
+	struct client_obd *cli = &obd->u.cli;
+	int adding;
+	int added;
+	int req_count;
+	int rc;
+
+	rc = osc_setup_common(obd, lcfg);
+	if (rc < 0)
+		return rc;
+
 	rc = osc_tunables_init(obd);
 	if (rc)
 		goto out_quota;
@@ -2910,23 +2937,10 @@ int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 
 out_quota:
 	osc_quota_cleanup(obd);
-out_ptlrpcd_work:
-	if (cli->cl_writeback_work) {
-		ptlrpcd_destroy_work(cli->cl_writeback_work);
-		cli->cl_writeback_work = NULL;
-	}
-	if (cli->cl_lru_work) {
-		ptlrpcd_destroy_work(cli->cl_lru_work);
-		cli->cl_lru_work = NULL;
-	}
-out_client_setup:
-	client_obd_cleanup(obd);
-out_ptlrpcd:
-	ptlrpcd_decref();
 	return rc;
 }
 
-static int osc_precleanup(struct obd_device *obd)
+int osc_precleanup_common(struct obd_device *obd)
 {
 	struct client_obd *cli = &obd->u.cli;
 
@@ -2951,12 +2965,20 @@ static int osc_precleanup(struct obd_device *obd)
 	}
 
 	obd_cleanup_client_import(obd);
+	return 0;
+}
+EXPORT_SYMBOL(osc_precleanup_common);
+
+static int osc_precleanup(struct obd_device *obd)
+{
+	osc_precleanup_common(obd);
+
 	ptlrpc_lprocfs_unregister_obd(obd);
 	lprocfs_obd_cleanup(obd);
 	return 0;
 }
 
-static int osc_cleanup(struct obd_device *obd)
+int osc_cleanup_common(struct obd_device *obd)
 {
 	struct client_obd *cli = &obd->u.cli;
 	int rc;
@@ -2984,6 +3006,7 @@ static int osc_cleanup(struct obd_device *obd)
 	ptlrpcd_decref();
 	return rc;
 }
+EXPORT_SYMBOL(osc_cleanup_common);
 
 int osc_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg)
 {
@@ -3001,7 +3024,7 @@ static int osc_process_config(struct obd_device *obd, u32 len, void *buf)
 	.owner		= THIS_MODULE,
 	.setup		= osc_setup,
 	.precleanup	= osc_precleanup,
-	.cleanup	= osc_cleanup,
+	.cleanup	= osc_cleanup_common,
 	.add_conn	= client_import_add_conn,
 	.del_conn	= client_import_del_conn,
 	.connect	= client_connect_import,
-- 
1.8.3.1

  parent reply	other threads:[~2019-09-30 18:55 UTC|newest]

Thread overview: 165+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 18:54 [lustre-devel] [PATCH 000/151] lustre: update to 2.11 support James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 001/151] lnet: fix needed headers for lnet headers James Simmons
2019-10-01  7:24   ` NeilBrown
2019-10-01 17:52     ` James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 002/151] lustre: fix signal handling in abortable waits James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 003/151] lnet: ksocklnd: add secondary IP address handling James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 004/151] lnet: o2iblnd: " James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 005/151] lnet: consoldate " James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 006/151] lustre: support for gcc8 James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 007/151] lnet: Allocate MEs and small MDs in own kmem_caches James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 008/151] lustre: seq: make seq_proc_write_common() safer James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 009/151] lustre: ptlrpc: Fix an rq_no_reply assertion failure James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 010/151] lustre: fld: resend seq lookup RPC if it is on LWP James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 011/151] lustre: fld: retry fld rpc even for ESHUTDOWN James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 012/151] lustre: fld: retry fld rpc until the import is closed James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 013/151] lustre: fld: fld client lookup should retry James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 014/151] lustre: ldlm: testcases for multiple modify RPCs feature James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 015/151] lustre: ldlm: Don't check opcode with NULL rq_reqmsg James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 016/151] lustre: all: remove all Sun license and URL references James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 017/151] lustre: ldlm: Use interval tree to update kms James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 018/151] lustre: osc: prepare OSC code to be used from MDC James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 019/151] lustre: statahead: support striped directory James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 020/151] lustre: readdir: improve striped readdir James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 021/151] lustre: llog: consolidate common error checking James Simmons
2019-10-01  1:29   ` NeilBrown
2019-10-01 17:51     ` James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 022/151] lustre: llite: NULL pointer dereference in cl_object_top() James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 023/151] lustre: ptlrpc: remove incorrect pid printing James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 024/151] lnet: Fix lost lock James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 025/151] lustre: llite: Reduce overhead for ll_do_fast_read James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 026/151] lustre: ptlrpc: change cr_sent_tv from timespec to ktime James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 027/151] lustre: ptlrpc: Use C99 initializer in ptlrpc_register_rqbd() James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 028/151] lustre: lmv: stripe dir page may be released mistakenly James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 029/151] lnet: selftest: Use C99 struct initializer in framework.c James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 030/151] lnet: fix memory leak and lnet_interfaces_max James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 031/151] lnet: decref on peer after use James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 032/151] lnet: rediscover peer if it changed James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 033/151] lnet: resolve unsafe list access James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 034/151] lustre: llite: Implement ladvise lockahead James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 035/151] lustre: jobstats: move jobstats code into separate file James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 036/151] lustre: ldlm: don't use jiffies as sysfs parameter James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 037/151] lnet: Handle ping buffer with only loopback NID James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 038/151] lustre: llite: enable readahead for small read_ahead_per_file James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 039/151] lnet: don't discover loopback interface James Simmons
2019-09-30 18:54 ` [lustre-devel] [PATCH 040/151] lnet: reduce logging severity James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 041/151] lustre: ptlrpc: migrate pinger to 64 bit time James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 042/151] lustre: mdc: add cl_device to the MDC James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 043/151] lustre: lov: add MDT target to the LOV device James Simmons
2019-10-01  0:33   ` NeilBrown
2019-10-01 18:03     ` James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 044/151] lustre: mdt: IO request handling in MDT James Simmons
2019-09-30 18:55 ` James Simmons [this message]
2019-09-30 18:55 ` [lustre-devel] [PATCH 046/151] lustre: mdc: add IO methods to the MDC James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 047/151] lustre: lvbo: pass lock as parameter to lvbo_update() James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 048/151] lustre: mds: add IO locking to the MDC and MDT James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 049/151] lustre: mdc: add IO stats in mdc James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 050/151] lustre: lov: add Data-on-MDT tests and fixes James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 051/151] lustre: mdc: use generic grant code at MDT James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 052/151] lustre: mds: combine DoM bit with other IBITS James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 053/151] lustre: llite: increase whole-file readahead to RPC size James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 054/151] lustre: ldlm: remove liblustre remnants James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 055/151] lustre: misc: replace LASSERT() with BUILD_BUG_ON() James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 056/151] lustre: llite: check layout size after cl_object_layout_get James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 057/151] lustre: mdc: implement own mdc_io_fsync_start() James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 058/151] lustre: ldlm: migrate the rest of the code to 64 bit time James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 059/151] lustre: llite: sync bdi sysfs name with lustre sysfs tree James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 060/151] lustre: lov: allow lov.*.stripe{size, count}=-1 param James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 061/151] lustre: brw: add short io osc/ost transfer James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 062/151] lustre: lov: take lov layout lock for I/O with ignore_layout James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 063/151] lustre: lov: pack lsm_flags from layout James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 064/151] lustre: clio: introduce CIT_GLIMPSE for glimpse James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 065/151] lustre: flr: add infrastructure to create a new mirror James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 066/151] lustre: clio: no glimpse for data immutable file James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 067/151] lustre: flr: read support for flr James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 068/151] lustre: lov: rework write intent on componect instantiation James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 069/151] lustre: ptlrpc: use lu_extent in layout_intent James Simmons
2019-10-01  3:26   ` NeilBrown
2019-10-01 17:54     ` James Simmons
2019-10-01 23:19       ` NeilBrown
2019-10-04 20:39       ` Cory Spitz
2019-09-30 18:55 ` [lustre-devel] [PATCH 070/151] lustre: flr: Send write intent RPC to mdt James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 071/151] lustre: flr: extend DATA_VERSION API to read layout version James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 072/151] lustre: lov: skip empty pages in lov_io_submit() James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 073/151] lustre: mdc: don't assert on name pack James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 074/151] lustre: flr: mirror read and write James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 075/151] lustre: flr: resync support and test tool James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 076/151] lustre: flr: randomize mirror pick James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 077/151] lustre: flr: instantiate component for truncate James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 078/151] lustre: hsm: don't release with wrong size James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 079/151] lustre: mdc: Add an additional set of 64 changelog flags James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 080/151] lustre: ldlm: assume OBD_CONNECT_IBITS James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 081/151] lustre: llite: assume OBD_CONNECT_ATTRFID James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 082/151] lustre: llite: simplify ll_inode_revalidate() James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 083/151] lustre: obd: free obd_svc_stats when all users are gone James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 084/151] lustre: mdc: add uid/gid to Changelogs entries James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 085/151] lustre: scrub: general framework for OI scrub James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 086/151] lustre: idl: clean up and document ptlrpc structures James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 087/151] lustre: idl: remove obsolete RPC MSG flags James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 088/151] lnet: libcfs: call proper crypto algo when keys are passed in James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 089/151] lustre: clio: remove unused cl_lock layers James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 090/151] lustre: sec: migrate to 64 bit time James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 091/151] lustre: llite: avoid live-lock when concurrent mmap()s James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 092/151] lustre: llite: change lli_glimpse_time to ktime James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 093/151] lustre: hsm: filter kkuc write by client UUID James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 094/151] lustre: dne: allow mkdir with specific MDTs James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 095/151] lustre: misc: update Intel copyright messages for 2017 James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 096/151] lustre: fid: improve seq allocation error messages James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 097/151] lustre: mdc: interruptable during RPC retry for EINPROGRESS James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 098/151] lustre: osc: migrate to 64 bit time James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 099/151] lustre: vvp: Print discarded page warning on -EIO James Simmons
2019-09-30 18:55 ` [lustre-devel] [PATCH 100/151] lustre: clio: Use readahead for partial page write James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 101/151] lustre: flr: comp-flags support when creating mirrors James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 102/151] lustre: libcfs: remove cfs_time_XXX_64 wrappers James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 103/151] lustre: address issues raised by gcc7 James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 104/151] lustre: lov: fill no-extent fiemap on object with no stripe James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 105/151] lustre: ptlrpc: allow to limit number of service's rqbds James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 106/151] lnet: ensure peer put back on dc request queue James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 107/151] lustre: recovery: support setstripe replay James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 108/151] lustre: lustre: move LA_* flags to lustre_user.h James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 109/151] lustre: flr: revise lease API James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 110/151] lustre: idl: add PTLRPC definitions to enum James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 111/151] lustre: obd: remove s2dhms time function James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 112/151] lustre: mdc: add client NID to Changelogs entries James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 113/151] lustre: mdc: implement CL_OPEN for Changelogs James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 114/151] lustre: acl: prepare small buffer for ACL RPC reply James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 115/151] lnet: safe access in debug print James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 116/151] lnet: Remove LASSERT on userspace data James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 117/151] lustre: flr: split a mirror from mirrored file James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 118/151] lustre: llite: deny 2.10 clients to open mirrored files James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 119/151] lustre: uapi: rename LCM_FL_NOT_FLR to LCM_FL_NONE James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 120/151] lustre: flr: layout truncate compatibility James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 121/151] lustre: mdc: high-priority request handling for DOM James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 122/151] lustre: llite: Add tiny write support James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 123/151] lustre: mdc: add CL_GETXATTR for Changelogs James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 124/151] lustre: uapi: record denied OPEN in Changelogs James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 125/151] lustre: llite: have ll_write_end to sync for DIO James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 126/151] lustre: obd: add check to obd_statfs James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 127/151] lustre: obd: fix statfs handling James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 128/151] lustre: dom: support DATA_VERSION IO type James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 129/151] lnet: fix contiguous range support James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 130/151] lustre: osc: add a bit to indicate osc_page in cache tree James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 131/151] lustre: ldlm: fix export reference James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 132/151] lustre: llite: Add exit for filedata allocation failed James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 133/151] lustre: misc: Wrong checksum return value James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 134/151] lustre: llite: fix mount error handing James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 135/151] lustre: llite: Disable tiny writes for append James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 136/151] lustre: uapi: replace FMODE_{READ, WRITE} with MDS_* equivs James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 137/151] lnet: reduce discovery timeout James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 138/151] lustre: update version to 2.10.99 James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 139/151] lustre: ptlrpc: clarify 64 bit time usage James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 140/151] lustre: ptlrpc: add watchdog for ptlrpc service threads James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 141/151] lustre: handles: discard h_owner in favour of h_ops James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 142/151] lustre: ldlm: Remove use of SLAB_DESTROY_BY_RCU for ldlm lock slab James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 143/151] lustre: ldlm: simplify lock_mode_to_index() James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 144/151] lustre: ptlrpc: use list_move where appropriate James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 145/151] lustre: ptlrpc: simplify locking in ptlrpc_add_rqs_to_pool() James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 146/151] lustre: ptlrpc: incorporate BUILD_BUG_ON into ptlrpc_req_async_args() James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 147/151] lustre: introduce CONFIG_LUSTRE_FS_POSIX_ACL James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 148/151] lustre: ptlrpc: discard a server-only waitq James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 149/151] lustre: llite: remove // comments James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 150/151] lustre: remove outdated comments about ->ap_* functions James Simmons
2019-09-30 18:56 ` [lustre-devel] [PATCH 151/151] lustre: clean up some comment alignment James Simmons
2019-10-01  7:01 ` [lustre-devel] [PATCH 000/151] lustre: update to 2.11 support NeilBrown
2019-10-01 18:07   ` James Simmons
2019-10-02  0:52     ` NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1569869810-23848-46-git-send-email-jsimmons@infradead.org \
    --to=jsimmons@infradead.org \
    --cc=lustre-devel@lists.lustre.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.