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
branch: HEAD
[fs/lustre-release.git]
/
lustre
/
osc
/
osc_cl_internal.h
diff --git
a/lustre/osc/osc_cl_internal.h
b/lustre/osc/osc_cl_internal.h
index
6085101
..
b8cdd3e
100644
(file)
--- a/
lustre/osc/osc_cl_internal.h
+++ b/
lustre/osc/osc_cl_internal.h
@@
-388,14
+388,24
@@
static inline struct osc_object *cl2osc(const struct cl_object *obj)
static inline ldlm_mode_t osc_cl_lock2ldlm(enum cl_lock_mode mode)
{
static inline ldlm_mode_t osc_cl_lock2ldlm(enum cl_lock_mode mode)
{
- LASSERT(mode == CLM_READ || mode == CLM_WRITE);
- return mode == CLM_READ ? LCK_PR : LCK_PW;
+ LASSERT(mode == CLM_READ || mode == CLM_WRITE || mode == CLM_GROUP);
+ if (mode == CLM_READ)
+ return LCK_PR;
+ else if (mode == CLM_WRITE)
+ return LCK_PW;
+ else
+ return LCK_GROUP;
}
static inline enum cl_lock_mode osc_ldlm2cl_lock(ldlm_mode_t mode)
{
}
static inline enum cl_lock_mode osc_ldlm2cl_lock(ldlm_mode_t mode)
{
- LASSERT(mode == LCK_PR || mode == LCK_PW);
- return mode == LCK_PR ? CLM_READ : CLM_WRITE;
+ LASSERT(mode == LCK_PR || mode == LCK_PW || mode == LCK_GROUP);
+ if (mode == LCK_PR)
+ return CLM_READ;
+ else if (mode == LCK_PW)
+ return CLM_WRITE;
+ else
+ return CLM_GROUP;
}
static inline struct osc_page *cl2osc_page(const struct cl_page_slice *slice)
}
static inline struct osc_page *cl2osc_page(const struct cl_page_slice *slice)
@@
-415,6
+425,11
@@
static inline struct osc_lock *osc_lock_at(const struct cl_lock *lock)
return cl2osc_lock(cl_lock_at(lock, &osc_device_type));
}
return cl2osc_lock(cl_lock_at(lock, &osc_device_type));
}
+static inline int osc_io_srvlock(struct osc_io *oio)
+{
+ return (oio->oi_lockless && !oio->oi_cl.cis_io->ci_no_srvlock);
+}
+
/** @} osc */
#endif /* OSC_CL_INTERNAL_H */
/** @} osc */
#endif /* OSC_CL_INTERNAL_H */