Whamcloud - gitweb
LU-3373 osd-ldiskfs: export ext4_truncate
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / sles11sp2 / export-ext4-3.0.patch
1 ---
2  fs/ext4/balloc.c       |    1 +
3  fs/ext4/ext4.h         |    2 ++
4  fs/ext4/ext4_extents.h |    9 +++++++++
5  fs/ext4/ext4_jbd2.c    |    2 ++
6  fs/ext4/extents.c      |   23 ++++++++++++++++-------
7  fs/ext4/ialloc.c       |    3 ++-
8  fs/ext4/inode.c        |    1 +
9  fs/ext4/mballoc.c      |    4 ++++
10  fs/ext4/super.c        |    9 +++++++++
11  9 files changed, 46 insertions(+), 8 deletions(-)
12
13 Index: linux-stage/fs/ext4/balloc.c
14 ===================================================================
15 --- linux-stage.orig/fs/ext4/balloc.c
16 +++ linux-stage/fs/ext4/balloc.c
17 @@ -231,6 +231,7 @@ struct ext4_group_desc * ext4_get_group_
18                 *bh = sbi->s_group_desc[group_desc];
19         return desc;
20  }
21 +EXPORT_SYMBOL(ext4_get_group_desc);
22  
23  static int ext4_valid_block_bitmap(struct super_block *sb,
24                                         struct ext4_group_desc *desc,
25 Index: linux-stage/fs/ext4/ext4.h
26 ===================================================================
27 --- linux-stage.orig/fs/ext4/ext4.h
28 +++ linux-stage/fs/ext4/ext4.h
29 @@ -1783,6 +1783,8 @@ extern struct inode * ext4_orphan_get(st
30  extern unsigned long ext4_count_free_inodes(struct super_block *);
31  extern unsigned long ext4_count_dirs(struct super_block *);
32  extern void ext4_check_inodes_bitmap(struct super_block *);
33 +extern struct buffer_head *ext4_read_inode_bitmap(struct super_block *sb,
34 +                                                 ext4_group_t block_group);
35  extern void ext4_mark_bitmap_end(int start_bit, int end_bit, char *bitmap);
36  extern int ext4_init_inode_table(struct super_block *sb,
37                                  ext4_group_t group, int barrier);
38 Index: linux-stage/fs/ext4/ext4_extents.h
39 ===================================================================
40 --- linux-stage.orig/fs/ext4/ext4_extents.h
41 +++ linux-stage/fs/ext4/ext4_extents.h
42 @@ -290,5 +290,14 @@ extern struct ext4_ext_path *ext4_ext_fi
43                                                         struct ext4_ext_path *);
44  extern void ext4_ext_drop_refs(struct ext4_ext_path *);
45  extern int ext4_ext_check_inode(struct inode *inode);
46 +extern int ext4_ext_search_right(struct inode *inode,
47 +                                struct ext4_ext_path *path,
48 +                                ext4_lblk_t *logical, ext4_fsblk_t *phys);
49 +extern int ext4_ext_search_left(struct inode *inode,
50 +                               struct ext4_ext_path *path,
51 +                               ext4_lblk_t *logical, ext4_fsblk_t *phys);
52 +extern int ext4_ext_walk_space(struct inode *inode, ext4_lblk_t block,
53 +                               ext4_lblk_t num, ext_prepare_callback func,
54 +                               void *cbdata);
55  #endif /* _EXT4_EXTENTS */
56  
57 Index: linux-stage/fs/ext4/ext4_jbd2.c
58 ===================================================================
59 --- linux-stage.orig/fs/ext4/ext4_jbd2.c
60 +++ linux-stage/fs/ext4/ext4_jbd2.c
61 @@ -19,6 +19,7 @@ int __ext4_journal_get_write_access(cons
62         }
63         return err;
64  }
65 +EXPORT_SYMBOL(__ext4_journal_get_write_access);
66  
67  /*
68   * The ext4 forget function must perform a revoke if we are freeing data
69 @@ -150,3 +151,4 @@ int __ext4_handle_dirty_super(const char
70                 sb->s_dirt = 1;
71         return err;
72  }
73 +EXPORT_SYMBOL(__ext4_handle_dirty_metadata);
74 Index: linux-stage/fs/ext4/extents.c
75 ===================================================================
76 --- linux-stage.orig/fs/ext4/extents.c
77 +++ linux-stage/fs/ext4/extents.c
78 @@ -1233,9 +1233,9 @@ out:
79   * returns 0 at @phys
80   * return value contains 0 (success) or error code
81   */
82 -static int ext4_ext_search_left(struct inode *inode,
83 -                               struct ext4_ext_path *path,
84 -                               ext4_lblk_t *logical, ext4_fsblk_t *phys)
85 +int ext4_ext_search_left(struct inode *inode,
86 +                        struct ext4_ext_path *path,
87 +                        ext4_lblk_t *logical, ext4_fsblk_t *phys)
88  {
89         struct ext4_extent_idx *ix;
90         struct ext4_extent *ex;
91 @@ -1298,9 +1298,9 @@ static int ext4_ext_search_left(struct i
92   * returns 0 at @phys
93   * return value contains 0 (success) or error code
94   */
95 -static int ext4_ext_search_right(struct inode *inode,
96 -                                struct ext4_ext_path *path,
97 -                                ext4_lblk_t *logical, ext4_fsblk_t *phys)
98 +int ext4_ext_search_right(struct inode *inode,
99 +                         struct ext4_ext_path *path,
100 +                         ext4_lblk_t *logical, ext4_fsblk_t *phys)
101  {
102         struct buffer_head *bh = NULL;
103         struct ext4_extent_header *eh;
104 @@ -1875,7 +1875,7 @@ cleanup:
105         return err;
106  }
107  
108 -static int ext4_ext_walk_space(struct inode *inode, ext4_lblk_t block,
109 +extern int ext4_ext_walk_space(struct inode *inode, ext4_lblk_t block,
110                                ext4_lblk_t num, ext_prepare_callback func,
111                                void *cbdata)
112  {
113 @@ -4380,3 +4380,12 @@ int ext4_fiemap(struct inode *inode, str
114  
115         return error;
116  }
117 +
118 +EXPORT_SYMBOL(ext4_ext_search_right);
119 +EXPORT_SYMBOL(ext4_ext_search_left);
120 +EXPORT_SYMBOL(ext4_ext_insert_extent);
121 +EXPORT_SYMBOL(ext4_mb_new_blocks);
122 +EXPORT_SYMBOL(ext4_mark_inode_dirty);
123 +EXPORT_SYMBOL(ext4_ext_walk_space);
124 +EXPORT_SYMBOL(ext4_ext_find_extent);
125 +EXPORT_SYMBOL(ext4_ext_drop_refs);
126 Index: linux-stage/fs/ext4/ialloc.c
127 ===================================================================
128 --- linux-stage.orig/fs/ext4/ialloc.c
129 +++ linux-stage/fs/ext4/ialloc.c
130 @@ -99,7 +99,7 @@ static unsigned ext4_init_inode_bitmap(s
131   *
132   * Return buffer_head of bitmap on success or NULL.
133   */
134 -static struct buffer_head *
135 +struct buffer_head *
136  ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
137  {
138         struct ext4_group_desc *desc;
139 @@ -164,6 +164,7 @@ ext4_read_inode_bitmap(struct super_bloc
140         }
141         return bh;
142  }
143 +EXPORT_SYMBOL(ext4_read_inode_bitmap);
144  
145  /*
146   * NOTE! When we get the inode, we're the only people
147 Index: linux-stage/fs/ext4/inode.c
148 ===================================================================
149 --- linux-stage.orig/fs/ext4/inode.c
150 +++ linux-stage/fs/ext4/inode.c
151 @@ -4685,6 +4685,7 @@ out_stop:
152         ext4_journal_stop(handle);
153         trace_ext4_truncate_exit(inode);
154  }
155 +EXPORT_SYMBOL(ext4_truncate);
156  
157  /*
158   * ext4_get_inode_loc returns with an extra refcount against the inode's
159 @@ -5098,6 +5099,7 @@ bad_inode:
160         iget_failed(inode);
161         return ERR_PTR(ret);
162  }
163 +EXPORT_SYMBOL(ext4_iget);
164  
165  static int ext4_inode_blocks_set(handle_t *handle,
166                                 struct ext4_inode *raw_inode,
167 Index: linux-stage/fs/ext4/mballoc.c
168 ===================================================================
169 --- linux-stage.orig/fs/ext4/mballoc.c
170 +++ linux-stage/fs/ext4/mballoc.c
171 @@ -3852,6 +3852,7 @@ repeat:
172                 call_rcu(&(pa)->u.pa_rcu, ext4_mb_pa_callback);
173         }
174  }
175 +EXPORT_SYMBOL(ext4_discard_preallocations);
176  
177  #ifdef CONFIG_EXT4_DEBUG
178  static void ext4_mb_show_ac(struct ext4_allocation_context *ac)
179 @@ -4972,3 +4973,6 @@ int ext4_trim_fs(struct super_block *sb,
180  
181         return ret;
182  }
183 +
184 +EXPORT_SYMBOL(ext4_free_blocks);
185 +
186 Index: linux-stage/fs/ext4/super.c
187 ===================================================================
188 --- linux-stage.orig/fs/ext4/super.c
189 +++ linux-stage/fs/ext4/super.c
190 @@ -194,6 +194,7 @@ __u32 ext4_itable_unused_count(struct su
191                 (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ?
192                  (__u32)le16_to_cpu(bg->bg_itable_unused_hi) << 16 : 0);
193  }
194 +EXPORT_SYMBOL(ext4_itable_unused_count);
195  
196  void ext4_block_bitmap_set(struct super_block *sb,
197                            struct ext4_group_desc *bg, ext4_fsblk_t blk)
198 @@ -378,6 +379,7 @@ void ext4_journal_abort_handle(const cha
199  
200         jbd2_journal_abort_handle(handle);
201  }
202 +EXPORT_SYMBOL(ext4_journal_abort_handle);
203  
204  static void __save_error_info(struct super_block *sb, const char *func,
205                             unsigned int line)
206 @@ -4270,6 +4272,7 @@ int ext4_force_commit(struct super_block
207  
208         return ret;
209  }
210 +EXPORT_SYMBOL(ext4_force_commit);
211  
212  static void ext4_write_super(struct super_block *sb)
213  {
214 @@ -5198,6 +5201,12 @@ static void __exit ext4_exit_fs(void)
215         ext4_exit_pageio();
216  }
217  
218 +EXPORT_SYMBOL(ext4_xattr_get);
219 +EXPORT_SYMBOL(ext4_xattr_set_handle);
220 +EXPORT_SYMBOL(ext4_bread);
221 +EXPORT_SYMBOL(ext4_journal_start_sb);
222 +EXPORT_SYMBOL(__ext4_journal_stop);
223 +
224  MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
225  MODULE_DESCRIPTION("Fourth Extended Filesystem");
226  MODULE_LICENSE("GPL");