aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-06-27 19:16:02 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-06-27 19:16:02 -0400
commit1f7d1e77419050831a905353683807fa69a26625 (patch)
tree0f32626160b1ecab1e6067ff0e94746c3da068c4 /fs/ext4/ext4.h
parent8bb2b247124ba6093455d4aef26743b1bef27bc5 (diff)
ext4: move __ext4_check_blockref to block_validity.c
In preparation for moving the indirect functions to a separate file, move __ext4_check_blockref() to block_validity.c and rename it to ext4_check_blockref() which is exported as globally visible function. Also, rename the cpp macro ext4_check_inode_blockref() to ext4_ind_check_inode(), to make it clear that it is only valid for use with non-extent mapped inodes. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 8532dd43d320..82ba7eb7c4a5 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2125,6 +2125,19 @@ static inline void ext4_mark_super_dirty(struct super_block *sb)
2125} 2125}
2126 2126
2127/* 2127/*
2128 * Block validity checking
2129 */
2130#define ext4_check_indirect_blockref(inode, bh) \
2131 ext4_check_blockref(__func__, __LINE__, inode, \
2132 (__le32 *)(bh)->b_data, \
2133 EXT4_ADDR_PER_BLOCK((inode)->i_sb))
2134
2135#define ext4_ind_check_inode(inode) \
2136 ext4_check_blockref(__func__, __LINE__, inode, \
2137 EXT4_I(inode)->i_data, \
2138 EXT4_NDIR_BLOCKS)
2139
2140/*
2128 * Inodes and files operations 2141 * Inodes and files operations
2129 */ 2142 */
2130 2143
@@ -2153,6 +2166,8 @@ extern void ext4_exit_system_zone(void);
2153extern int ext4_data_block_valid(struct ext4_sb_info *sbi, 2166extern int ext4_data_block_valid(struct ext4_sb_info *sbi,
2154 ext4_fsblk_t start_blk, 2167 ext4_fsblk_t start_blk,
2155 unsigned int count); 2168 unsigned int count);
2169extern int ext4_check_blockref(const char *, unsigned int,
2170 struct inode *, __le32 *, unsigned int);
2156 2171
2157/* extents.c */ 2172/* extents.c */
2158extern int ext4_ext_tree_init(handle_t *handle, struct inode *); 2173extern int ext4_ext_tree_init(handle_t *handle, struct inode *);