Whamcloud - gitweb
b=4336
[fs/lustre-release.git] / lustre / kernel_patches / patches / ext3_snapfs_exports-2.4.24.patch
1 Index: linux-2.4.24/include/linux/ext3_fs.h
2 ===================================================================
3 --- linux-2.4.24.orig/include/linux/ext3_fs.h   2004-07-04 20:23:10.000000000 +0800
4 +++ linux-2.4.24/include/linux/ext3_fs.h        2004-07-04 20:23:15.000000000 +0800
5 @@ -446,7 +446,8 @@
6         __u8    s_reserved_char_pad;
7         __u16   s_reserved_word_pad;
8         __u32   s_mdsnum;
9 -       __u32   s_reserved[191];        /* Padding to the end of the block */
10 +       __u32   s_snaptable_ino;        /*snaptable ino*/
11 +       __u32   s_reserved[190];        /* Padding to the end of the block */
12  };
13  
14  #ifdef __KERNEL__
15 @@ -799,7 +800,8 @@
16  extern void ext3_ext_init(struct super_block *);
17  extern void ext3_ext_release(struct super_block *);
18  extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *);
19 -
20 +extern int ext3_bmap(struct address_space *mapping, long block);
21 +extern int ext3_load_inode_bitmap (struct super_block * sb, unsigned int block_group);
22  #endif /* __KERNEL__ */
23  
24  #define EXT3_IOC_CREATE_INUM                   _IOW('f', 5, long)
25 Index: linux-2.4.24/fs/ext3/inode.c
26 ===================================================================
27 --- linux-2.4.24.orig/fs/ext3/inode.c   2004-07-04 20:23:09.000000000 +0800
28 +++ linux-2.4.24/fs/ext3/inode.c        2004-07-04 20:23:15.000000000 +0800
29 @@ -1200,7 +1200,7 @@
30   * So, if we see any bmap calls here on a modified, data-journaled file,
31   * take extra steps to flush any blocks which might be in the cache. 
32   */
33 -static int ext3_bmap(struct address_space *mapping, long block)
34 +int ext3_bmap(struct address_space *mapping, long block)
35  {
36         struct inode *inode = mapping->host;
37         journal_t *journal;
38 Index: linux-2.4.24/fs/ext3/ext3-exports.c
39 ===================================================================
40 --- linux-2.4.24.orig/fs/ext3/ext3-exports.c    2004-07-04 20:23:10.000000000 +0800
41 +++ linux-2.4.24/fs/ext3/ext3-exports.c 2004-07-04 21:11:42.000000000 +0800
42 @@ -26,6 +26,15 @@
43  EXPORT_SYMBOL(ext3_decode_error);
44  EXPORT_SYMBOL(__ext3_std_error);
45  
46 +EXPORT_SYMBOL(ext3_bmap);
47 +EXPORT_SYMBOL(ext3_new_inode);
48 +EXPORT_SYMBOL(ext3_load_inode_bitmap);
49 +EXPORT_SYMBOL(ext3_orphan_add);
50 +EXPORT_SYMBOL(ext3_orphan_del);
51 +EXPORT_SYMBOL(ext3_discard_prealloc);
52 +EXPORT_SYMBOL(ext3_get_group_desc);
53 +EXPORT_SYMBOL(ext3_getblk);
54 +
55  int ext3_add_dir_entry (struct dentry *dentry);
56  EXPORT_SYMBOL(ext3_add_dir_entry);
57  int ext3_del_dir_entry(struct dentry *dentry);
58 Index: linux-2.4.24/fs/ext3/ialloc.c
59 ===================================================================
60 --- linux-2.4.24.orig/fs/ext3/ialloc.c  2004-07-04 20:23:09.000000000 +0800
61 +++ linux-2.4.24/fs/ext3/ialloc.c       2004-07-04 20:23:15.000000000 +0800
62 @@ -79,6 +79,13 @@
63         return retval;
64  }
65  
66 +/* Export load_inode_bitmap*/
67 +int ext3_load_inode_bitmap (struct super_block * sb,
68 +                           unsigned int block_group)
69 +{
70 +       return load_inode_bitmap(sb, block_group);
71 +}
72 +
73  /*
74   * load_inode_bitmap loads the inode bitmap for a blocks group
75   *