X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fldlm%2Fldlm_internal.h;h=0b79fe59f1b2b683eb3b8477d5dbd353e3897b24;hb=3cce65712d94cffe8f1626545845b95b88aef672;hp=136d9f5fefcbab1d1b53031741e9d5ab33783fe6;hpb=9c028e74c2202a8a481557c4cb22225734aaf19f;p=fs%2Flustre-release.git diff --git a/lustre/ldlm/ldlm_internal.h b/lustre/ldlm/ldlm_internal.h index 136d9f5..0b79fe5 100644 --- a/lustre/ldlm/ldlm_internal.h +++ b/lustre/ldlm/ldlm_internal.h @@ -30,8 +30,6 @@ * Lustre is a trademark of Sun Microsystems, Inc. */ -#define MAX_STRING_SIZE 128 - extern int ldlm_srv_namespace_nr; extern int ldlm_cli_namespace_nr; extern struct mutex ldlm_srv_namespace_lock; @@ -122,6 +120,7 @@ extern unsigned int ldlm_enqueue_min; /* ldlm_resource.c */ extern struct kmem_cache *ldlm_resource_slab; extern struct kmem_cache *ldlm_lock_slab; +extern struct kmem_cache *ldlm_inodebits_slab; extern struct kmem_cache *ldlm_interval_tree_slab; void ldlm_resource_insert_lock_after(struct ldlm_lock *original, @@ -158,7 +157,8 @@ void ldlm_add_ast_work_item(struct ldlm_lock *lock, struct ldlm_lock *new, #ifdef HAVE_SERVER_SUPPORT int ldlm_reprocess_queue(struct ldlm_resource *res, struct list_head *queue, struct list_head *work_list, - enum ldlm_process_intention intention); + enum ldlm_process_intention intention, + struct ldlm_lock *hint); int ldlm_handle_conflict_lock(struct ldlm_lock *lock, __u64 *flags, struct list_head *rpc_list); void ldlm_discard_bl_list(struct list_head *bl_list); @@ -204,14 +204,25 @@ int ldlm_process_inodebits_lock(struct ldlm_lock *lock, __u64 *flags, enum ldlm_process_intention intention, enum ldlm_error *err, struct list_head *work_list); +int ldlm_reprocess_inodebits_queue(struct ldlm_resource *res, + struct list_head *queue, + struct list_head *work_list, + enum ldlm_process_intention intention, + struct ldlm_lock *hint); /* ldlm_extent.c */ int ldlm_process_extent_lock(struct ldlm_lock *lock, __u64 *flags, enum ldlm_process_intention intention, enum ldlm_error *err, struct list_head *work_list); #endif +int ldlm_extent_alloc_lock(struct ldlm_lock *lock); void ldlm_extent_add_lock(struct ldlm_resource *res, struct ldlm_lock *lock); void ldlm_extent_unlink_lock(struct ldlm_lock *lock); +int ldlm_inodebits_alloc_lock(struct ldlm_lock *lock); +void ldlm_inodebits_add_lock(struct ldlm_resource *res, struct list_head *head, + struct ldlm_lock *lock); +void ldlm_inodebits_unlink_lock(struct ldlm_lock *lock); + /* ldlm_flock.c */ int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, enum ldlm_process_intention intention, @@ -237,7 +248,6 @@ struct ldlm_state { extern struct kmem_cache *ldlm_interval_slab; /* slab cache for ldlm_interval */ extern void ldlm_interval_attach(struct ldlm_interval *n, struct ldlm_lock *l); extern struct ldlm_interval *ldlm_interval_detach(struct ldlm_lock *l); -extern struct ldlm_interval *ldlm_interval_alloc(struct ldlm_lock *lock); extern void ldlm_interval_free(struct ldlm_interval *node); /* this function must be called with res lock held */ static inline struct ldlm_extent * @@ -346,7 +356,7 @@ static inline void ldlm_add_var(struct lprocfs_vars *vars, struct dentry *debugfs_entry, const char *name, void *data, const struct file_operations *ops) { - snprintf((char *)vars->name, MAX_STRING_SIZE, "%s", name); + vars->name = name; vars->data = data; vars->fops = ops; ldebugfs_add_vars(debugfs_entry, vars, NULL);