extern char *ldlm_lockname[];
extern char *ldlm_typename[];
-#define LDLM_DEBUG(lock, format, a...) \
-do { \
- CDEBUG(D_DLMTRACE, "### " format \
- " (%s: lock %p mode %s/%s on res %Lu (rc %d) " \
- " type %s remote %Lx)\n" , ## a, \
- lock->l_resource->lr_namespace->ns_name, lock, \
- ldlm_lockname[lock->l_granted_mode], \
- ldlm_lockname[lock->l_req_mode], \
- lock->l_resource->lr_name[0], \
- atomic_read(&lock->l_resource->lr_refcount), \
- ldlm_typename[lock->l_resource->lr_type], \
- lock->l_remote_handle.addr); \
+#define LDLM_DEBUG(lock, format, a...) \
+do { \
+ CDEBUG(D_DLMTRACE, "### " format \
+ " (%s: lock %p(rc=%d/%d,%d) mode %s/%s on res %Lu" \
+ "(rc=%d) type %s remote %Lx)\n" , ## a, \
+ lock->l_resource->lr_namespace->ns_name, lock, \
+ lock->l_refc, lock->l_readers, lock->l_writers, \
+ ldlm_lockname[lock->l_granted_mode], \
+ ldlm_lockname[lock->l_req_mode], \
+ lock->l_resource->lr_name[0], \
+ atomic_read(&lock->l_resource->lr_refcount), \
+ ldlm_typename[lock->l_resource->lr_type], \
+ lock->l_remote_handle.addr); \
} while (0)
#define LDLM_DEBUG_NOLOCK(format, a...) \
int cookie_len, int *flags,
ldlm_lock_callback completion,
ldlm_lock_callback blocking);
-struct ldlm_resource *ldlm_convert(struct ldlm_lock *lock, int new_mode,
+struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode,
int *flags);
void ldlm_lock_cancel(struct ldlm_lock *lock);
+void ldlm_run_ast_work(struct list_head *rpc_list);
void ldlm_reprocess_all(struct ldlm_resource *res);
void ldlm_lock_dump(struct ldlm_lock *lock);
/* ldlm_request.c */
int ldlm_cli_enqueue(struct ptlrpc_client *cl,
struct ptlrpc_connection *peer,
+ struct lustre_handle *connh,
struct ptlrpc_request *req,
struct ldlm_namespace *ns,
struct lustre_handle *parent_lock_handle,
struct lustre_handle *lockh);
int ldlm_server_ast(struct lustre_handle *lockh, struct ldlm_lock_desc *new,
void *data, __u32 data_len);
-int ldlm_cli_convert(struct ptlrpc_client *, struct lustre_handle *,
+int ldlm_cli_convert(struct ptlrpc_client *, struct lustre_handle *, struct lustre_handle *connh,
int new_mode, int *flags);
-int ldlm_cli_cancel(struct lustre_handle *);
+int ldlm_cli_cancel(struct lustre_handle *lockh, struct lustre_handle *connh);
#endif /* __KERNEL__ */