1 Index: linux-2.6.32.i386/fs/ext4/ext4.h
2 ===================================================================
3 --- linux-2.6.32.i386.orig/fs/ext4/ext4.h 2010-04-16 03:39:11.000000000 +0530
4 +++ linux-2.6.32.i386/fs/ext4/ext4.h 2010-04-16 04:27:41.000000000 +0530
9 +#include <linux/dynlocks.h>
10 #include <linux/types.h>
11 #include <linux/blkdev.h>
12 #include <linux/magic.h>
14 ext4_fsblk_t i_file_acl;
17 + /* following fields for parallel directory operations -bzzz */
18 + struct dynlock i_htree_lock;
19 + struct semaphore i_append_sem;
22 * i_block_group is the number of the block group which contains
23 * this file's inode. Constant across the lifetime of the inode,
24 Index: linux-2.6.32.i386/fs/ext4/namei.c
25 ===================================================================
26 --- linux-2.6.32.i386.orig/fs/ext4/namei.c 2010-04-15 07:42:15.000000000 +0530
27 +++ linux-2.6.32.i386/fs/ext4/namei.c 2010-04-16 04:26:03.000000000 +0530
29 ext4_lblk_t *block, int *err)
31 struct buffer_head *bh;
32 + struct ext4_inode_info *ei = EXT4_I(inode);
34 + /* with parallel dir operations all appends
35 + * have to be serialized -bzzz */
36 + down(&ei->i_append_sem);
38 *block = inode->i_size >> inode->i_sb->s_blocksize_bits;
44 + ei->i_disksize = inode->i_size;
46 + up(&ei->i_append_sem);
50 Index: linux-2.6.32.i386/fs/ext4/super.c
51 ===================================================================
52 --- linux-2.6.32.i386.orig/fs/ext4/super.c 2010-04-16 03:39:11.000000000 +0530
53 +++ linux-2.6.32.i386/fs/ext4/super.c 2010-04-16 04:26:03.000000000 +0530
56 ei->vfs_inode.i_version = 1;
57 ei->vfs_inode.i_data.writeback_index = 0;
58 + dynlock_init(&ei->i_htree_lock);
59 + sema_init(&ei->i_append_sem, 1);
60 memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache));
61 INIT_LIST_HEAD(&ei->i_prealloc_list);
62 spin_lock_init(&ei->i_prealloc_lock);