-Index: linux-stage/fs/ext4/ext4.h
-===================================================================
---- linux-stage.orig/fs/ext4/ext4.h
-+++ linux-stage/fs/ext4/ext4.h
-@@ -1032,7 +1032,14 @@ extern int ext4fs_dirhash(const char *na
- dx_hash_info *hinfo);
-
- /* ialloc.c */
--extern struct inode * ext4_new_inode(handle_t *, struct inode *, int);
-+extern struct inode *ext4_new_inode_goal(handle_t *handle, struct inode *dir,
-+ int mode, unsigned goal);
-+static inline struct inode *ext4_new_inode(handle_t *handle, struct inode *dir,
-+ int mode)
-+{
-+ return ext4_new_inode_goal(handle, dir, mode,
-+ EXT4_SB(dir->i_sb)->s_inode_goal);
-+}
- extern void ext4_free_inode(handle_t *, struct inode *);
- extern struct inode * ext4_orphan_get(struct super_block *, unsigned long);
- extern unsigned long ext4_count_free_inodes(struct super_block *);
-Index: linux-stage/fs/ext4/super.c
-===================================================================
---- linux-stage.orig/fs/ext4/super.c
-+++ linux-stage/fs/ext4/super.c
-@@ -560,6 +560,7 @@ static void ext4_put_super(struct super_
- }
- if (sbi->s_proc) {
- remove_proc_entry("inode_readahead_blks", sbi->s_proc);
-+ remove_proc_entry("inode_goal", sbi->s_proc);
- remove_proc_entry(sb->s_id, ext4_proc_root);
- }
-
-@@ -2274,6 +2275,11 @@ static int ext4_fill_super(struct super_
- p->proc_fops = &ext4_ui_proc_fops;
- p->data = &sbi->s_inode_readahead_blks;
- }
-+ p = create_proc_entry("inode_goal", 0644, sbi->s_proc);
-+ if (p) {
-+ p->proc_fops = &ext4_ui_proc_fops,
-+ p->data = &sbi->s_inode_goal;
-+ }
- }
- #endif
-
-@@ -2553,6 +2558,7 @@ failed_mount2:
- failed_mount:
- if (sbi->s_proc) {
- remove_proc_entry("inode_readahead_blks", sbi->s_proc);
-+ remove_proc_entry("inode_goal", sbi->s_proc);
- remove_proc_entry(sb->s_id, ext4_proc_root);
- }
- #ifdef CONFIG_QUOTA
-Index: linux-stage/fs/ext4/ext4_sb.h
-===================================================================
---- linux-stage.orig/fs/ext4/ext4_sb.h
-+++ linux-stage/fs/ext4/ext4_sb.h
-@@ -53,6 +53,7 @@ struct ext4_sb_info {
- int s_inode_size;
- int s_first_ino;
- unsigned int s_inode_readahead_blks;
-+ unsigned int s_inode_goal;
- spinlock_t s_next_gen_lock;
- u32 s_next_generation;
- u32 s_hash_seed[4];
-