#define LDLM_FL_AST_SENT (1 << 5)
#define LDLM_FL_DESTROYED (1 << 6)
#define LDLM_FL_WAIT_NOREPROC (1 << 7)
+#define LDLM_FL_CANCEL (1 << 8)
+
+#define LDLM_CB_BLOCKING 1
+#define LDLM_CB_CANCELING 2
#define L2B(c) (1 << c)
struct lustre_lock ns_lock; /* protects hash, refcount, list */
struct list_head ns_list_chain; /* position in global NS list */
struct proc_dir_entry *ns_proc_dir;
+
+ spinlock_t ns_counter_lock;
+ __u64 ns_locks;
+ __u64 ns_resources;
};
/*
typedef int (*ldlm_blocking_callback)(struct ldlm_lock *lock,
struct ldlm_lock_desc *new, void *data,
- __u32 data_len);
+ __u32 data_len, int flag);
typedef int (*ldlm_completion_callback)(struct ldlm_lock *lock, int flags);
void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh);
struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *handle);
void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh);
+void ldlm_cancel_callback(struct ldlm_lock *lock);
#define LDLM_LOCK_PUT(lock) \
do { \
void *data, __u32 data_len);
int ldlm_cli_convert(struct lustre_handle *, int new_mode, int *flags);
int ldlm_cli_cancel(struct lustre_handle *lockh);
-int ldlm_cli_cancel_unused(struct ldlm_namespace *ns, __u64 *res_id);
+int ldlm_cli_cancel_unused(struct ldlm_namespace *, __u64 *, int local_only);
/* mds/handler.c */
/* This has to be here because recurisve inclusion sucks. */
int mds_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
- void *data, __u32 data_len);
+ void *data, __u32 data_len, int flag);
#endif /* __KERNEL__ */