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-4832 ptlrpc: fix incorrect name string in nrs_tbf
[fs/lustre-release.git]
/
lustre
/
osc
/
osc_dev.c
diff --git
a/lustre/osc/osc_dev.c
b/lustre/osc/osc_dev.c
index
819ed7f
..
85e96ec
100644
(file)
--- a/
lustre/osc/osc_dev.c
+++ b/
lustre/osc/osc_dev.c
@@
-1,6
+1,4
@@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@
-26,8
+24,10
@@
* GPL HEADER END
*/
/*
* GPL HEADER END
*/
/*
- * Copyright
2008 Sun Microsystems, Inc.
All rights reserved.
+ * Copyright
(c) 2008, 2010, Oracle and/or its affiliates.
All rights reserved.
* Use is subject to license terms.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2012, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-49,20
+49,16
@@
* @{
*/
* @{
*/
-cfs_mem_cache_t *osc_page_kmem;
-cfs_mem_cache_t *osc_lock_kmem;
-cfs_mem_cache_t *osc_object_kmem;
-cfs_mem_cache_t *osc_thread_kmem;
-cfs_mem_cache_t *osc_session_kmem;
-cfs_mem_cache_t *osc_req_kmem;
+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_req_kmem;
+struct kmem_cache *osc_extent_kmem;
+struct kmem_cache *osc_quota_kmem;
struct lu_kmem_descr osc_caches[] = {
{
struct lu_kmem_descr osc_caches[] = {
{
- .ckd_cache = &osc_page_kmem,
- .ckd_name = "osc_page_kmem",
- .ckd_size = sizeof (struct osc_page)
- },
- {
.ckd_cache = &osc_lock_kmem,
.ckd_name = "osc_lock_kmem",
.ckd_size = sizeof (struct osc_lock)
.ckd_cache = &osc_lock_kmem,
.ckd_name = "osc_lock_kmem",
.ckd_size = sizeof (struct osc_lock)
@@
-88,11
+84,21
@@
struct lu_kmem_descr osc_caches[] = {
.ckd_size = sizeof (struct osc_req)
},
{
.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_quota_kmem,
+ .ckd_name = "osc_quota_kmem",
+ .ckd_size = sizeof(struct osc_quota_info)
+ },
+ {
.ckd_cache = NULL
}
};
.ckd_cache = NULL
}
};
-
cfs_lock_class_key_t
osc_ast_guard_class;
+
struct lock_class_key
osc_ast_guard_class;
/*****************************************************************************
*
/*****************************************************************************
*
@@
-112,14
+118,14
@@
static struct lu_device *osc2lu_dev(struct osc_device *osc)
*/
static void *osc_key_init(const struct lu_context *ctx,
*/
static void *osc_key_init(const struct lu_context *ctx,
- struct lu_context_key *key)
+ struct lu_context_key *key)
{
{
-
struct osc_thread_info *info;
+ struct osc_thread_info *info;
-
OBD_SLAB_ALLOC_PTR_GFP(info, osc_thread_kmem, CFS_ALLOC_IO
);
-
if (info == NULL)
-
info = ERR_PTR(-ENOMEM);
-
return info;
+
OBD_SLAB_ALLOC_PTR_GFP(info, osc_thread_kmem, GFP_NOFS
);
+ if (info == NULL)
+ info = ERR_PTR(-ENOMEM);
+ return info;
}
static void osc_key_fini(const struct lu_context *ctx,
}
static void osc_key_fini(const struct lu_context *ctx,
@@
-136,14
+142,14
@@
struct lu_context_key osc_key = {
};
static void *osc_session_init(const struct lu_context *ctx,
};
static void *osc_session_init(const struct lu_context *ctx,
-
struct lu_context_key *key)
+ struct lu_context_key *key)
{
{
-
struct osc_session *info;
+ struct osc_session *info;
-
OBD_SLAB_ALLOC_PTR_GFP(info, osc_session_kmem, CFS_ALLOC_IO
);
-
if (info == NULL)
-
info = ERR_PTR(-ENOMEM);
-
return info;
+
OBD_SLAB_ALLOC_PTR_GFP(info, osc_session_kmem, GFP_NOFS
);
+ if (info == NULL)
+ info = ERR_PTR(-ENOMEM);
+ return info;
}
static void osc_session_fini(const struct lu_context *ctx,
}
static void osc_session_fini(const struct lu_context *ctx,