dlmglue.h (df152c241df9e9d2b9a65d37bd02961abe7f591a) dlmglue.h (cb25797d451dc774d9dbc402a65f16a0e32199fe)
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * dlmglue.h
5 *
6 * description here
7 *
8 * Copyright (C) 2002, 2004 Oracle. All rights reserved.

--- 64 unchanged lines hidden (view full) ---

73/* ocfs2_inode_lock_full() 'arg_flags' flags */
74/* don't wait on recovery. */
75#define OCFS2_META_LOCK_RECOVERY (0x01)
76/* Instruct the dlm not to queue ourselves on the other node. */
77#define OCFS2_META_LOCK_NOQUEUE (0x02)
78/* don't block waiting for the downconvert thread, instead return -EAGAIN */
79#define OCFS2_LOCK_NONBLOCK (0x04)
80
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * dlmglue.h
5 *
6 * description here
7 *
8 * Copyright (C) 2002, 2004 Oracle. All rights reserved.

--- 64 unchanged lines hidden (view full) ---

73/* ocfs2_inode_lock_full() 'arg_flags' flags */
74/* don't wait on recovery. */
75#define OCFS2_META_LOCK_RECOVERY (0x01)
76/* Instruct the dlm not to queue ourselves on the other node. */
77#define OCFS2_META_LOCK_NOQUEUE (0x02)
78/* don't block waiting for the downconvert thread, instead return -EAGAIN */
79#define OCFS2_LOCK_NONBLOCK (0x04)
80
81/* Locking subclasses of inode cluster lock */
82enum {
83 OI_LS_NORMAL = 0,
84 OI_LS_PARENT,
85 OI_LS_RENAME1,
86 OI_LS_RENAME2,
87};
88
81int ocfs2_dlm_init(struct ocfs2_super *osb);
82void ocfs2_dlm_shutdown(struct ocfs2_super *osb, int hangup_pending);
83void ocfs2_lock_res_init_once(struct ocfs2_lock_res *res);
84void ocfs2_inode_lock_res_init(struct ocfs2_lock_res *res,
85 enum ocfs2_lock_type type,
86 unsigned int generation,
87 struct inode *inode);
88void ocfs2_dentry_lock_res_init(struct ocfs2_dentry_lock *dl,

--- 10 unchanged lines hidden (view full) ---

99int ocfs2_rw_lock(struct inode *inode, int write);
100void ocfs2_rw_unlock(struct inode *inode, int write);
101int ocfs2_open_lock(struct inode *inode);
102int ocfs2_try_open_lock(struct inode *inode, int write);
103void ocfs2_open_unlock(struct inode *inode);
104int ocfs2_inode_lock_atime(struct inode *inode,
105 struct vfsmount *vfsmnt,
106 int *level);
89int ocfs2_dlm_init(struct ocfs2_super *osb);
90void ocfs2_dlm_shutdown(struct ocfs2_super *osb, int hangup_pending);
91void ocfs2_lock_res_init_once(struct ocfs2_lock_res *res);
92void ocfs2_inode_lock_res_init(struct ocfs2_lock_res *res,
93 enum ocfs2_lock_type type,
94 unsigned int generation,
95 struct inode *inode);
96void ocfs2_dentry_lock_res_init(struct ocfs2_dentry_lock *dl,

--- 10 unchanged lines hidden (view full) ---

107int ocfs2_rw_lock(struct inode *inode, int write);
108void ocfs2_rw_unlock(struct inode *inode, int write);
109int ocfs2_open_lock(struct inode *inode);
110int ocfs2_try_open_lock(struct inode *inode, int write);
111void ocfs2_open_unlock(struct inode *inode);
112int ocfs2_inode_lock_atime(struct inode *inode,
113 struct vfsmount *vfsmnt,
114 int *level);
107int ocfs2_inode_lock_full(struct inode *inode,
115int ocfs2_inode_lock_full_nested(struct inode *inode,
108 struct buffer_head **ret_bh,
109 int ex,
116 struct buffer_head **ret_bh,
117 int ex,
110 int arg_flags);
118 int arg_flags,
119 int subclass);
111int ocfs2_inode_lock_with_page(struct inode *inode,
112 struct buffer_head **ret_bh,
113 int ex,
114 struct page *page);
120int ocfs2_inode_lock_with_page(struct inode *inode,
121 struct buffer_head **ret_bh,
122 int ex,
123 struct page *page);
124/* Variants without special locking class or flags */
125#define ocfs2_inode_lock_full(i, r, e, f)\
126 ocfs2_inode_lock_full_nested(i, r, e, f, OI_LS_NORMAL)
127#define ocfs2_inode_lock_nested(i, b, e, s)\
128 ocfs2_inode_lock_full_nested(i, b, e, 0, s)
115/* 99% of the time we don't want to supply any additional flags --
116 * those are for very specific cases only. */
129/* 99% of the time we don't want to supply any additional flags --
130 * those are for very specific cases only. */
117#define ocfs2_inode_lock(i, b, e) ocfs2_inode_lock_full(i, b, e, 0)
131#define ocfs2_inode_lock(i, b, e) ocfs2_inode_lock_full_nested(i, b, e, 0, OI_LS_NORMAL)
118void ocfs2_inode_unlock(struct inode *inode,
119 int ex);
120int ocfs2_super_lock(struct ocfs2_super *osb,
121 int ex);
122void ocfs2_super_unlock(struct ocfs2_super *osb,
123 int ex);
124int ocfs2_orphan_scan_lock(struct ocfs2_super *osb, u32 *seqno);
125void ocfs2_orphan_scan_unlock(struct ocfs2_super *osb, u32 seqno);

--- 26 unchanged lines hidden ---
132void ocfs2_inode_unlock(struct inode *inode,
133 int ex);
134int ocfs2_super_lock(struct ocfs2_super *osb,
135 int ex);
136void ocfs2_super_unlock(struct ocfs2_super *osb,
137 int ex);
138int ocfs2_orphan_scan_lock(struct ocfs2_super *osb, u32 *seqno);
139void ocfs2_orphan_scan_unlock(struct ocfs2_super *osb, u32 seqno);

--- 26 unchanged lines hidden ---