1 diff -rupN linux-2.6.7.old/fs/ext3/namei.c linux-2.6.7/fs/ext3/namei.c
2 --- linux-2.6.7.old/fs/ext3/namei.c 2004-11-05 16:44:21.000000000 +0200
3 +++ linux-2.6.7/fs/ext3/namei.c 2004-11-05 16:57:12.858866328 +0200
4 @@ -1163,6 +1163,7 @@ static struct dentry *ext3_lookup(struct
5 dentry->d_flags |= DCACHE_CROSS_REF;
6 dentry->d_generation = mds[1];
7 dentry->d_mdsnum = mds[0];
8 + dentry->d_fid = mds[2];
10 ext3_unlock_htree(dir, lock);
12 @@ -1391,7 +1392,7 @@ static int add_dirent_to_buf(handle_t *h
13 if (EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_MDSNUM)
14 && (dentry->d_flags & DCACHE_CROSS_REF)
15 && (dentry->d_mdsnum != EXT3_SB(sb)->s_mdsnum))
16 - reclen += 8; /* we need space to store mds num */
17 + reclen += 12; /* we need space to store mds num */
19 de = (struct ext3_dir_entry_2 *)bh->b_data;
20 top = bh->b_data + dir->i_sb->s_blocksize - reclen;
21 @@ -1444,6 +1445,7 @@ static int add_dirent_to_buf(handle_t *h
22 mds = (__u32 *)((char *)de + EXT3_DIR_REC_LEN(namelen));
23 mds[0] = cpu_to_le32(dentry->d_mdsnum);
24 mds[1] = cpu_to_le32(dentry->d_generation);
25 + mds[2] = cpu_to_le32(dentry->d_fid);
26 de->inode = cpu_to_le32(dentry->d_inum);
29 diff -rupN linux-2.6.7.old/include/linux/ext3_fs.h linux-2.6.7/include/linux/ext3_fs.h
30 --- linux-2.6.7.old/include/linux/ext3_fs.h 2004-11-05 16:44:21.000000000 +0200
31 +++ linux-2.6.7/include/linux/ext3_fs.h 2004-11-05 16:56:17.183330296 +0200
32 @@ -616,7 +616,7 @@ struct ext3_dir_entry_2 {
33 #define EXT3_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT3_DIR_ROUND) & \
35 #define EXT3_DIR_REC_LEN_DE(de) (EXT3_DIR_REC_LEN((de)->name_len) + \
36 - (((de)->file_type & 128) ? 8 : 0))
37 + (((de)->file_type & 128) ? 12 : 0))
40 * Hash Tree Directory indexing