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-13723 lustre: Convert ERR_PTR(PTR_ERR()) to ERR_CAST()
[fs/lustre-release.git]
/
lustre
/
obdclass
/
local_storage.h
diff --git
a/lustre/obdclass/local_storage.h
b/lustre/obdclass/local_storage.h
index
9f50128
..
63af194
100644
(file)
--- a/
lustre/obdclass/local_storage.h
+++ b/
lustre/obdclass/local_storage.h
@@
-20,7
+20,7
@@
* GPL HEADER END
*/
/*
* GPL HEADER END
*/
/*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012,
2014,
Intel Corporation.
*/
/*
* lustre/obdclass/local_storage.c
*/
/*
* lustre/obdclass/local_storage.c
@@
-29,6
+29,8
@@
*
* Author: Mikhail Pershin <mike.pershin@intel.com>
*/
*
* Author: Mikhail Pershin <mike.pershin@intel.com>
*/
+#ifndef __LOCAL_STORAGE_H
+#define __LOCAL_STORAGE_H
#include <dt_object.h>
#include <obd.h>
#include <dt_object.h>
#include <obd.h>
@@
-38,19
+40,19
@@
struct ls_device {
struct dt_device ls_top_dev;
/* all initialized ls_devices on this node linked by this */
struct ls_device {
struct dt_device ls_top_dev;
/* all initialized ls_devices on this node linked by this */
-
cfs_list_t
ls_linkage;
+
struct list_head
ls_linkage;
/* how many handle's reference this local storage */
/* how many handle's reference this local storage */
-
cfs_atomic_t
ls_refcount;
+
atomic_t
ls_refcount;
/* underlaying OSD device */
struct dt_device *ls_osd;
/* list of all local OID storages */
/* underlaying OSD device */
struct dt_device *ls_osd;
/* list of all local OID storages */
-
cfs_list_t
ls_los_list;
+
struct list_head
ls_los_list;
struct mutex ls_los_mutex;
};
static inline struct ls_device *dt2ls_dev(struct dt_device *d)
{
struct mutex ls_los_mutex;
};
static inline struct ls_device *dt2ls_dev(struct dt_device *d)
{
- return container_of
0
(d, struct ls_device, ls_top_dev);
+ return container_of
_safe
(d, struct ls_device, ls_top_dev);
}
struct ls_object {
}
struct ls_object {
@@
-60,14
+62,16
@@
struct ls_object {
static inline struct ls_object *lu2ls_obj(struct lu_object *o)
{
static inline struct ls_object *lu2ls_obj(struct lu_object *o)
{
- return container_of
0
(o, struct ls_object, ls_obj.do_lu);
+ return container_of
_safe
(o, struct ls_object, ls_obj.do_lu);
}
static inline struct dt_object *ls_locate(const struct lu_env *env,
struct ls_device *ls,
}
static inline struct dt_object *ls_locate(const struct lu_env *env,
struct ls_device *ls,
- const struct lu_fid *fid)
+ const struct lu_fid *fid,
+ const struct lu_object_conf *conf)
{
{
- return dt_locate_at(env, ls->ls_osd, fid, &ls->ls_top_dev.dd_lu_dev);
+ return dt_locate_at(env, ls->ls_osd, fid,
+ &ls->ls_top_dev.dd_lu_dev, conf);
}
struct ls_device *ls_device_get(struct dt_device *dev);
}
struct ls_device *ls_device_get(struct dt_device *dev);
@@
-87,3
+91,4
@@
struct los_ondisk {
#define LOS_MAGIC 0xdecafbee
#define LOS_MAGIC 0xdecafbee
+#endif