Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-7236 ptlrpc: idle connections can disconnect
[fs/lustre-release.git]
/
lustre
/
osc
/
osc_dev.c
diff --git
a/lustre/osc/osc_dev.c
b/lustre/osc/osc_dev.c
index
c340736
..
1b4acca
100644
(file)
--- a/
lustre/osc/osc_dev.c
+++ b/
lustre/osc/osc_dev.c
@@
-15,11
+15,7
@@
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
*
* GPL HEADER END
*/
@@
-27,7
+23,7
@@
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, 201
5
, Intel Corporation.
+ * Copyright (c) 2012, 201
7
, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-42,19
+38,25
@@
/* class_name2obd() */
#include <obd_class.h>
/* class_name2obd() */
#include <obd_class.h>
+#include <lustre_osc.h>
-#include "osc_
cl_
internal.h"
+#include "osc_internal.h"
-/** \addtogroup osc
- * @{
+/** \addtogroup osc
+ * @{
*/
struct kmem_cache *osc_lock_kmem;
*/
struct kmem_cache *osc_lock_kmem;
+EXPORT_SYMBOL(osc_lock_kmem);
struct kmem_cache *osc_object_kmem;
struct kmem_cache *osc_object_kmem;
+EXPORT_SYMBOL(osc_object_kmem);
+
struct kmem_cache *osc_thread_kmem;
struct kmem_cache *osc_session_kmem;
struct kmem_cache *osc_extent_kmem;
struct kmem_cache *osc_thread_kmem;
struct kmem_cache *osc_session_kmem;
struct kmem_cache *osc_extent_kmem;
+EXPORT_SYMBOL(osc_extent_kmem);
struct kmem_cache *osc_quota_kmem;
struct kmem_cache *osc_quota_kmem;
+EXPORT_SYMBOL(osc_quota_kmem);
struct lu_kmem_descr osc_caches[] = {
{
struct lu_kmem_descr osc_caches[] = {
{
@@
-92,19
+94,6
@@
struct lu_kmem_descr osc_caches[] = {
}
};
}
};
-struct lock_class_key osc_ast_guard_class;
-
-/*****************************************************************************
- *
- * Type conversions.
- *
- */
-
-static struct lu_device *osc2lu_dev(struct osc_device *osc)
-{
- return &osc->od_cl.cd_lu_dev;
-}
-
/*****************************************************************************
*
* Osc device and device type functions.
/*****************************************************************************
*
* Osc device and device type functions.
@@
-125,8
+114,10
@@
static void *osc_key_init(const struct lu_context *ctx,
static void osc_key_fini(const struct lu_context *ctx,
struct lu_context_key *key, void *data)
{
static void osc_key_fini(const struct lu_context *ctx,
struct lu_context_key *key, void *data)
{
- struct osc_thread_info *info = data;
- OBD_SLAB_FREE_PTR(info, osc_thread_kmem);
+ struct osc_thread_info *info = data;
+
+ lu_buf_free(&info->oti_ladvise_buf);
+ OBD_SLAB_FREE_PTR(info, osc_thread_kmem);
}
struct lu_context_key osc_key = {
}
struct lu_context_key osc_key = {
@@
-134,6
+125,7
@@
struct lu_context_key osc_key = {
.lct_init = osc_key_init,
.lct_fini = osc_key_fini
};
.lct_init = osc_key_init,
.lct_fini = osc_key_fini
};
+EXPORT_SYMBOL(osc_key);
static void *osc_session_init(const struct lu_context *ctx,
struct lu_context_key *key)
static void *osc_session_init(const struct lu_context *ctx,
struct lu_context_key *key)
@@
-158,6
+150,7
@@
struct lu_context_key osc_session_key = {
.lct_init = osc_session_init,
.lct_fini = osc_session_fini
};
.lct_init = osc_session_init,
.lct_fini = osc_session_fini
};
+EXPORT_SYMBOL(osc_session_key);
/* type constructor/destructor: osc_type_{init,fini,start,stop}(). */
LU_TYPE_INIT_FINI(osc, &osc_key, &osc_session_key);
/* type constructor/destructor: osc_type_{init,fini,start,stop}(). */
LU_TYPE_INIT_FINI(osc, &osc_key, &osc_session_key);
@@
-175,27
+168,30
@@
static const struct lu_device_operations osc_lu_ops = {
.ldo_recovery_complete = NULL
};
.ldo_recovery_complete = NULL
};
-
static
int osc_device_init(const struct lu_env *env, struct lu_device *d,
-
const char *name, struct lu_device *next)
+int osc_device_init(const struct lu_env *env, struct lu_device *d,
+ const char *name, struct lu_device *next)
{
RETURN(0);
}
{
RETURN(0);
}
+EXPORT_SYMBOL(osc_device_init);
-st
atic st
ruct lu_device *osc_device_fini(const struct lu_env *env,
-
struct lu_device *d)
+struct lu_device *osc_device_fini(const struct lu_env *env,
+ struct lu_device *d)
{
return NULL;
}
{
return NULL;
}
+EXPORT_SYMBOL(osc_device_fini);
-st
atic st
ruct lu_device *osc_device_free(const struct lu_env *env,
-
struct lu_device *d)
+struct lu_device *osc_device_free(const struct lu_env *env,
+ struct lu_device *d)
{
{
-
struct osc_device *od = lu2osc_dev(d);
+ struct osc_device *od = lu2osc_dev(d);
-
cl_device_fini(lu2cl_dev(d));
-
OBD_FREE_PTR(od);
-
return NULL;
+ cl_device_fini(lu2cl_dev(d));
+ OBD_FREE_PTR(od);
+ return NULL;
}
}
+EXPORT_SYMBOL(osc_device_free);
static struct lu_device *osc_device_alloc(const struct lu_env *env,
struct lu_device_type *t,
static struct lu_device *osc_device_alloc(const struct lu_env *env,
struct lu_device_type *t,