summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorEric Sandeen2011-06-28 16:01:31 +0200
committerTheodore Ts'o2011-06-28 16:01:31 +0200
commitf86186b44b4164600cce03d0d93ad48ec21fa429 (patch)
tree48aafabbbe46d22de84e4e9b3ebf7c5b35fd6d1e /fs/ext4/ext4.h
parentext4: move ext4_ind_* functions from inode.c to indirect.c (diff)
downloadkernel-qcow2-linux-f86186b44b4164600cce03d0d93ad48ec21fa429.tar.gz
kernel-qcow2-linux-f86186b44b4164600cce03d0d93ad48ec21fa429.tar.xz
kernel-qcow2-linux-f86186b44b4164600cce03d0d93ad48ec21fa429.zip
ext4: refactor duplicated block placement code
I found that ext4_ext_find_goal() and ext4_find_near() share the same code for returning a coloured start block based on i_block_group. We can refactor this into a common function so that they don't diverge in the future. Thanks to adilger for suggesting the new function name. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index ddaf5043fb38..49d2cea47382 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1743,6 +1743,7 @@ extern unsigned ext4_init_block_bitmap(struct super_block *sb,
struct ext4_group_desc *desc);
#define ext4_free_blocks_after_init(sb, group, desc) \
ext4_init_block_bitmap(sb, NULL, group, desc)
+ext4_fsblk_t ext4_inode_to_goal_block(struct inode *);
/* dir.c */
extern int __ext4_check_dir_entry(const char *, unsigned int, struct inode *,