diff options
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
| -rw-r--r-- | fs/ocfs2/ocfs2.h | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index 740f448041e2..adf5e2ebc2c4 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" |
| @@ -159,7 +160,7 @@ struct ocfs2_lock_res { | |||
| 159 | int l_level; | 160 | int l_level; |
| 160 | unsigned int l_ro_holders; | 161 | unsigned int l_ro_holders; |
| 161 | unsigned int l_ex_holders; | 162 | unsigned int l_ex_holders; |
| 162 | union ocfs2_dlm_lksb l_lksb; | 163 | struct ocfs2_dlm_lksb l_lksb; |
| 163 | 164 | ||
| 164 | /* used from AST/BAST funcs. */ | 165 | /* used from AST/BAST funcs. */ |
| 165 | enum ocfs2_ast_action l_action; | 166 | enum ocfs2_ast_action l_action; |
| @@ -305,7 +306,9 @@ struct ocfs2_super | |||
| 305 | u32 s_next_generation; | 306 | u32 s_next_generation; |
| 306 | unsigned long osb_flags; | 307 | unsigned long osb_flags; |
| 307 | s16 s_inode_steal_slot; | 308 | s16 s_inode_steal_slot; |
| 309 | s16 s_meta_steal_slot; | ||
| 308 | atomic_t s_num_inodes_stolen; | 310 | atomic_t s_num_inodes_stolen; |
| 311 | atomic_t s_num_meta_stolen; | ||
| 309 | 312 | ||
| 310 | unsigned long s_mount_opt; | 313 | unsigned long s_mount_opt; |
| 311 | unsigned int s_atime_quantum; | 314 | unsigned int s_atime_quantum; |
| @@ -760,35 +763,18 @@ static inline unsigned int ocfs2_megabytes_to_clusters(struct super_block *sb, | |||
| 760 | return megs << (20 - OCFS2_SB(sb)->s_clustersize_bits); | 763 | return megs << (20 - OCFS2_SB(sb)->s_clustersize_bits); |
| 761 | } | 764 | } |
| 762 | 765 | ||
| 763 | static inline void ocfs2_init_inode_steal_slot(struct ocfs2_super *osb) | 766 | static inline void _ocfs2_set_bit(unsigned int bit, unsigned long *bitmap) |
| 764 | { | 767 | { |
| 765 | spin_lock(&osb->osb_lock); | 768 | ext2_set_bit(bit, bitmap); |
| 766 | osb->s_inode_steal_slot = OCFS2_INVALID_SLOT; | ||
| 767 | spin_unlock(&osb->osb_lock); | ||
| 768 | atomic_set(&osb->s_num_inodes_stolen, 0); | ||
| 769 | } | 769 | } |
| 770 | #define ocfs2_set_bit(bit, addr) _ocfs2_set_bit((bit), (unsigned long *)(addr)) | ||
| 770 | 771 | ||
| 771 | static inline void ocfs2_set_inode_steal_slot(struct ocfs2_super *osb, | 772 | static inline void _ocfs2_clear_bit(unsigned int bit, unsigned long *bitmap) |
| 772 | s16 slot) | ||
| 773 | { | 773 | { |
| 774 | spin_lock(&osb->osb_lock); | 774 | ext2_clear_bit(bit, bitmap); |
| 775 | osb->s_inode_steal_slot = slot; | ||
| 776 | spin_unlock(&osb->osb_lock); | ||
| 777 | } | ||
| 778 | |||
| 779 | static inline s16 ocfs2_get_inode_steal_slot(struct ocfs2_super *osb) | ||
| 780 | { | ||
| 781 | s16 slot; | ||
| 782 | |||
| 783 | spin_lock(&osb->osb_lock); | ||
| 784 | slot = osb->s_inode_steal_slot; | ||
| 785 | spin_unlock(&osb->osb_lock); | ||
| 786 | |||
| 787 | return slot; | ||
| 788 | } | 775 | } |
| 776 | #define ocfs2_clear_bit(bit, addr) _ocfs2_clear_bit((bit), (unsigned long *)(addr)) | ||
| 789 | 777 | ||
| 790 | #define ocfs2_set_bit ext2_set_bit | ||
| 791 | #define ocfs2_clear_bit ext2_clear_bit | ||
| 792 | #define ocfs2_test_bit ext2_test_bit | 778 | #define ocfs2_test_bit ext2_test_bit |
| 793 | #define ocfs2_find_next_zero_bit ext2_find_next_zero_bit | 779 | #define ocfs2_find_next_zero_bit ext2_find_next_zero_bit |
| 794 | #define ocfs2_find_next_bit ext2_find_next_bit | 780 | #define ocfs2_find_next_bit ext2_find_next_bit |
