1 diff -rupN linux-2.4.24.orig/fs/ext3/namei.c linux-2.4.24/fs/ext3/namei.c
2 --- linux-2.4.24.orig/fs/ext3/namei.c Tue Oct 5 10:34:28 2004
3 +++ linux-2.4.24/fs/ext3/namei.c Tue Oct 5 10:43:12 2004
4 @@ -1112,6 +1112,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];
12 @@ -1334,7 +1335,8 @@ 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,
18 + * inode num and fid num. */
20 de = (struct ext3_dir_entry_2 *)bh->b_data;
21 top = bh->b_data + dir->i_sb->s_blocksize - reclen;
22 @@ -1387,6 +1389,7 @@ static int add_dirent_to_buf(handle_t *h
23 mds = (__u32 *)((char *)de + EXT3_DIR_REC_LEN(namelen));
24 mds[0] = cpu_to_le32(dentry->d_mdsnum);
25 mds[1] = cpu_to_le32(dentry->d_generation);
26 + mds[2] = cpu_to_le32(dentry->d_fid);
27 de->inode = cpu_to_le32(dentry->d_inum);
30 diff -rupN linux-2.4.24.orig/include/linux/dcache.h linux-2.4.24/include/linux/dcache.h
31 --- linux-2.4.24.orig/include/linux/dcache.h Tue Oct 5 10:34:28 2004
32 +++ linux-2.4.24/include/linux/dcache.h Tue Oct 5 10:43:45 2004
33 @@ -123,6 +123,7 @@ struct dentry {
34 unsigned d_inum; /* for cross-fs references (Lustre) */
35 unsigned d_mdsnum; /* for cross-fs references (Lustre) */
36 unsigned d_generation; /* for cross-fs references (Lustre) */
37 + unsigned d_fid; /* for cross-fs references (Lustre) */
38 struct dentry * d_parent; /* parent directory */
39 struct list_head d_hash; /* lookup hash list */
40 struct list_head d_lru; /* d_count = 0 LRU list */
41 diff -rupN linux-2.4.24.orig/include/linux/ext3_fs.h linux-2.4.24/include/linux/ext3_fs.h
42 --- linux-2.4.24.orig/include/linux/ext3_fs.h Tue Oct 5 10:34:28 2004
43 +++ linux-2.4.24/include/linux/ext3_fs.h Tue Oct 5 10:44:29 2004
44 @@ -589,7 +589,7 @@ struct ext3_dir_entry_2 {
45 #define EXT3_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT3_DIR_ROUND) & \
47 #define EXT3_DIR_REC_LEN_DE(de) (EXT3_DIR_REC_LEN((de)->name_len) + \
48 - (((de)->file_type & 128) ? 8 : 0))
49 + (((de)->file_type & 128) ? 12 : 0))
52 * Hash Tree Directory indexing