diff options
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
-rw-r--r-- | fs/ocfs2/ocfs2.h | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index d963d8638709..1238b491db90 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h | |||
@@ -42,6 +42,7 @@ | |||
42 | 42 | ||
43 | #include "ocfs2_fs.h" | 43 | #include "ocfs2_fs.h" |
44 | #include "ocfs2_lockid.h" | 44 | #include "ocfs2_lockid.h" |
45 | #include "ocfs2_ioctl.h" | ||
45 | 46 | ||
46 | /* For struct ocfs2_blockcheck_stats */ | 47 | /* For struct ocfs2_blockcheck_stats */ |
47 | #include "blockcheck.h" | 48 | #include "blockcheck.h" |
@@ -136,6 +137,10 @@ enum ocfs2_unlock_action { | |||
136 | #define OCFS2_LOCK_PENDING (0x00000400) /* This lockres is pending a | 137 | #define OCFS2_LOCK_PENDING (0x00000400) /* This lockres is pending a |
137 | call to dlm_lock. Only | 138 | call to dlm_lock. Only |
138 | exists with BUSY set. */ | 139 | exists with BUSY set. */ |
140 | #define OCFS2_LOCK_UPCONVERT_FINISHING (0x00000800) /* blocks the dc thread | ||
141 | * from downconverting | ||
142 | * before the upconvert | ||
143 | * has completed */ | ||
139 | 144 | ||
140 | struct ocfs2_lock_res_ops; | 145 | struct ocfs2_lock_res_ops; |
141 | 146 | ||
@@ -155,7 +160,7 @@ struct ocfs2_lock_res { | |||
155 | int l_level; | 160 | int l_level; |
156 | unsigned int l_ro_holders; | 161 | unsigned int l_ro_holders; |
157 | unsigned int l_ex_holders; | 162 | unsigned int l_ex_holders; |
158 | union ocfs2_dlm_lksb l_lksb; | 163 | struct ocfs2_dlm_lksb l_lksb; |
159 | 164 | ||
160 | /* used from AST/BAST funcs. */ | 165 | /* used from AST/BAST funcs. */ |
161 | enum ocfs2_ast_action l_action; | 166 | enum ocfs2_ast_action l_action; |
@@ -245,9 +250,11 @@ enum ocfs2_mount_options | |||
245 | OCFS2_MOUNT_LOCALFLOCKS = 1 << 5, /* No cluster aware user file locks */ | 250 | OCFS2_MOUNT_LOCALFLOCKS = 1 << 5, /* No cluster aware user file locks */ |
246 | OCFS2_MOUNT_NOUSERXATTR = 1 << 6, /* No user xattr */ | 251 | OCFS2_MOUNT_NOUSERXATTR = 1 << 6, /* No user xattr */ |
247 | OCFS2_MOUNT_INODE64 = 1 << 7, /* Allow inode numbers > 2^32 */ | 252 | OCFS2_MOUNT_INODE64 = 1 << 7, /* Allow inode numbers > 2^32 */ |
248 | OCFS2_MOUNT_POSIX_ACL = 1 << 8, /* POSIX access control lists */ | 253 | OCFS2_MOUNT_POSIX_ACL = 1 << 8, /* Force POSIX access control lists */ |
249 | OCFS2_MOUNT_USRQUOTA = 1 << 9, /* We support user quotas */ | 254 | OCFS2_MOUNT_NO_POSIX_ACL = 1 << 9, /* Disable POSIX access |
250 | OCFS2_MOUNT_GRPQUOTA = 1 << 10, /* We support group quotas */ | 255 | control lists */ |
256 | OCFS2_MOUNT_USRQUOTA = 1 << 10, /* We support user quotas */ | ||
257 | OCFS2_MOUNT_GRPQUOTA = 1 << 11, /* We support group quotas */ | ||
251 | }; | 258 | }; |
252 | 259 | ||
253 | #define OCFS2_OSB_SOFT_RO 0x0001 | 260 | #define OCFS2_OSB_SOFT_RO 0x0001 |
@@ -299,7 +306,9 @@ struct ocfs2_super | |||
299 | u32 s_next_generation; | 306 | u32 s_next_generation; |
300 | unsigned long osb_flags; | 307 | unsigned long osb_flags; |
301 | s16 s_inode_steal_slot; | 308 | s16 s_inode_steal_slot; |
309 | s16 s_meta_steal_slot; | ||
302 | atomic_t s_num_inodes_stolen; | 310 | atomic_t s_num_inodes_stolen; |
311 | atomic_t s_num_meta_stolen; | ||
303 | 312 | ||
304 | unsigned long s_mount_opt; | 313 | unsigned long s_mount_opt; |
305 | unsigned int s_atime_quantum; | 314 | unsigned int s_atime_quantum; |
@@ -754,33 +763,6 @@ static inline unsigned int ocfs2_megabytes_to_clusters(struct super_block *sb, | |||
754 | return megs << (20 - OCFS2_SB(sb)->s_clustersize_bits); | 763 | return megs << (20 - OCFS2_SB(sb)->s_clustersize_bits); |
755 | } | 764 | } |
756 | 765 | ||
757 | static inline void ocfs2_init_inode_steal_slot(struct ocfs2_super *osb) | ||
758 | { | ||
759 | spin_lock(&osb->osb_lock); | ||
760 | osb->s_inode_steal_slot = OCFS2_INVALID_SLOT; | ||
761 | spin_unlock(&osb->osb_lock); | ||
762 | atomic_set(&osb->s_num_inodes_stolen, 0); | ||
763 | } | ||
764 | |||
765 | static inline void ocfs2_set_inode_steal_slot(struct ocfs2_super *osb, | ||
766 | s16 slot) | ||
767 | { | ||
768 | spin_lock(&osb->osb_lock); | ||
769 | osb->s_inode_steal_slot = slot; | ||
770 | spin_unlock(&osb->osb_lock); | ||
771 | } | ||
772 | |||
773 | static inline s16 ocfs2_get_inode_steal_slot(struct ocfs2_super *osb) | ||
774 | { | ||
775 | s16 slot; | ||
776 | |||
777 | spin_lock(&osb->osb_lock); | ||
778 | slot = osb->s_inode_steal_slot; | ||
779 | spin_unlock(&osb->osb_lock); | ||
780 | |||
781 | return slot; | ||
782 | } | ||
783 | |||
784 | #define ocfs2_set_bit ext2_set_bit | 766 | #define ocfs2_set_bit ext2_set_bit |
785 | #define ocfs2_clear_bit ext2_clear_bit | 767 | #define ocfs2_clear_bit ext2_clear_bit |
786 | #define ocfs2_test_bit ext2_test_bit | 768 | #define ocfs2_test_bit ext2_test_bit |