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-5092 nodemap: users of ted_nodemap should take ref
[fs/lustre-release.git]
/
lustre
/
osc
/
osc_dev.c
diff --git
a/lustre/osc/osc_dev.c
b/lustre/osc/osc_dev.c
index
44549b4
..
1dd13de
100644
(file)
--- a/
lustre/osc/osc_dev.c
+++ b/
lustre/osc/osc_dev.c
@@
-27,13
+27,13
@@
* 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
3
, Intel Corporation.
+ * Copyright (c) 2012, 201
5
, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
- * Implementation of cl_device,
cl_req
for OSC layer.
+ * Implementation of cl_device, for OSC layer.
*
* Author: Nikita Danilov <nikita.danilov@sun.com>
*/
*
* Author: Nikita Danilov <nikita.danilov@sun.com>
*/
@@
-53,7
+53,6
@@
struct kmem_cache *osc_lock_kmem;
struct kmem_cache *osc_object_kmem;
struct kmem_cache *osc_thread_kmem;
struct kmem_cache *osc_session_kmem;
struct kmem_cache *osc_object_kmem;
struct kmem_cache *osc_thread_kmem;
struct kmem_cache *osc_session_kmem;
-struct kmem_cache *osc_req_kmem;
struct kmem_cache *osc_extent_kmem;
struct kmem_cache *osc_quota_kmem;
struct kmem_cache *osc_extent_kmem;
struct kmem_cache *osc_quota_kmem;
@@
-79,11
+78,6
@@
struct lu_kmem_descr osc_caches[] = {
.ckd_size = sizeof (struct osc_session)
},
{
.ckd_size = sizeof (struct osc_session)
},
{
- .ckd_cache = &osc_req_kmem,
- .ckd_name = "osc_req_kmem",
- .ckd_size = sizeof (struct osc_req)
- },
- {
.ckd_cache = &osc_extent_kmem,
.ckd_name = "osc_extent_kmem",
.ckd_size = sizeof (struct osc_extent)
.ckd_cache = &osc_extent_kmem,
.ckd_name = "osc_extent_kmem",
.ckd_size = sizeof (struct osc_extent)
@@
-98,8
+92,6
@@
struct lu_kmem_descr osc_caches[] = {
}
};
}
};
-struct lock_class_key osc_ast_guard_class;
-
/*****************************************************************************
*
* Type conversions.
/*****************************************************************************
*
* Type conversions.
@@
-122,7
+114,7
@@
static void *osc_key_init(const struct lu_context *ctx,
{
struct osc_thread_info *info;
{
struct osc_thread_info *info;
- OBD_SLAB_ALLOC_PTR_GFP(info, osc_thread_kmem,
__GFP_IO
);
+ OBD_SLAB_ALLOC_PTR_GFP(info, osc_thread_kmem,
GFP_NOFS
);
if (info == NULL)
info = ERR_PTR(-ENOMEM);
return info;
if (info == NULL)
info = ERR_PTR(-ENOMEM);
return info;
@@
-131,8
+123,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 = {
@@
-146,7
+140,7
@@
static void *osc_session_init(const struct lu_context *ctx,
{
struct osc_session *info;
{
struct osc_session *info;
- OBD_SLAB_ALLOC_PTR_GFP(info, osc_session_kmem,
__GFP_IO
);
+ OBD_SLAB_ALLOC_PTR_GFP(info, osc_session_kmem,
GFP_NOFS
);
if (info == NULL)
info = ERR_PTR(-ENOMEM);
return info;
if (info == NULL)
info = ERR_PTR(-ENOMEM);
return info;
@@
-181,10
+175,6
@@
static const struct lu_device_operations osc_lu_ops = {
.ldo_recovery_complete = NULL
};
.ldo_recovery_complete = NULL
};
-static const struct cl_device_operations osc_cl_ops = {
- .cdo_req_init = osc_req_init
-};
-
static int osc_device_init(const struct lu_env *env, struct lu_device *d,
const char *name, struct lu_device *next)
{
static int osc_device_init(const struct lu_env *env, struct lu_device *d,
const char *name, struct lu_device *next)
{
@@
-194,7
+184,7
@@
static int osc_device_init(const struct lu_env *env, struct lu_device *d,
static struct lu_device *osc_device_fini(const struct lu_env *env,
struct lu_device *d)
{
static struct lu_device *osc_device_fini(const struct lu_env *env,
struct lu_device *d)
{
-
return 0
;
+
return NULL
;
}
static struct lu_device *osc_device_free(const struct lu_env *env,
}
static struct lu_device *osc_device_free(const struct lu_env *env,
@@
-223,7
+213,6
@@
static struct lu_device *osc_device_alloc(const struct lu_env *env,
cl_device_init(&od->od_cl, t);
d = osc2lu_dev(od);
d->ld_ops = &osc_lu_ops;
cl_device_init(&od->od_cl, t);
d = osc2lu_dev(od);
d->ld_ops = &osc_lu_ops;
- od->od_cl.cd_ops = &osc_cl_ops;
/* Setup OSC OBD */
obd = class_name2obd(lustre_cfg_string(cfg, 0));
/* Setup OSC OBD */
obd = class_name2obd(lustre_cfg_string(cfg, 0));