X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdclass%2Flocal_storage.h;h=caf26bfec6e28a7bb2c6c476b2f608ea83854766;hb=4594c6656d3224eb4f8eff100a2320df53c05a8f;hp=9f5012827f53c4119f299587e6ec3ecc658b75f1;hpb=c4677f0d97dff8d1084baa1792c0ad6af1000158;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/local_storage.h b/lustre/obdclass/local_storage.h index 9f50128..caf26bf 100644 --- a/lustre/obdclass/local_storage.h +++ b/lustre/obdclass/local_storage.h @@ -20,7 +20,7 @@ * GPL HEADER END */ /* - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2014, Intel Corporation. */ /* * lustre/obdclass/local_storage.c @@ -29,6 +29,8 @@ * * Author: Mikhail Pershin */ +#ifndef __LOCAL_STORAGE_H +#define __LOCAL_STORAGE_H #include #include @@ -38,13 +40,13 @@ 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 */ - cfs_atomic_t ls_refcount; + atomic_t ls_refcount; /* 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; }; @@ -65,9 +67,11 @@ static inline struct ls_object *lu2ls_obj(struct lu_object *o) 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); @@ -87,3 +91,12 @@ struct los_ondisk { #define LOS_MAGIC 0xdecafbee +/** + * Used in __local_file_create() for object lock role + **/ +enum los_object_role { + LOS_PARENT, + LOS_CHILD, +}; + +#endif