Commit 39e6d756 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre: Get rid of LIBLUSTRE_CLIENT and its users

This define only made sense in a userspace library client, not in the kernel.
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Reviewed-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7995035f
...@@ -350,8 +350,6 @@ do { \ ...@@ -350,8 +350,6 @@ do { \
l_wait_event_exclusive_head(wq, condition, &lwi); \ l_wait_event_exclusive_head(wq, condition, &lwi); \
}) })
#define LIBLUSTRE_CLIENT (0)
/** @} lib */ /** @} lib */
#endif /* _LUSTRE_LIB_H */ #endif /* _LUSTRE_LIB_H */
...@@ -475,12 +475,7 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, ...@@ -475,12 +475,7 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
"client-side enqueue, new policy data"); "client-side enqueue, new policy data");
} }
if ((*flags) & LDLM_FL_AST_SENT || if ((*flags) & LDLM_FL_AST_SENT) {
/* Cancel extent locks as soon as possible on a liblustre client,
* because it cannot handle asynchronous ASTs robustly (see
* bug 7311).
*/
(LIBLUSTRE_CLIENT && type == LDLM_EXTENT)) {
lock_res_and_lock(lock); lock_res_and_lock(lock);
lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_BL_AST; lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_BL_AST;
unlock_res_and_lock(lock); unlock_res_and_lock(lock);
...@@ -775,14 +770,6 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp, ...@@ -775,14 +770,6 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
body->lock_flags = ldlm_flags_to_wire(*flags); body->lock_flags = ldlm_flags_to_wire(*flags);
body->lock_handle[0] = *lockh; body->lock_handle[0] = *lockh;
/*
* Liblustre client doesn't get extent locks, except for O_APPEND case
* where [0, OBD_OBJECT_EOF] lock is taken, or truncate, where
* [i_size, OBD_OBJECT_EOF] lock is taken.
*/
LASSERT(ergo(LIBLUSTRE_CLIENT, einfo->ei_type != LDLM_EXTENT ||
policy->l_extent.end == OBD_OBJECT_EOF));
if (async) { if (async) {
LASSERT(reqp); LASSERT(reqp);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment