1 Index: linux-2.6.18.8/include/linux/ext3_fs_i.h
2 ===================================================================
3 --- linux-2.6.18.8.orig/include/linux/ext3_fs_i.h
4 +++ linux-2.6.18.8/include/linux/ext3_fs_i.h
5 @@ -154,6 +154,10 @@ struct ext3_inode_info {
6 struct inode vfs_inode;
8 struct ext3_ext_cache i_cached_extent;
11 + struct list_head i_prealloc_list;
12 + spinlock_t i_prealloc_lock;
15 #endif /* _LINUX_EXT3_FS_I */
16 Index: linux-2.6.18.8/include/linux/ext3_fs_sb.h
17 ===================================================================
18 --- linux-2.6.18.8.orig/include/linux/ext3_fs_sb.h
19 +++ linux-2.6.18.8/include/linux/ext3_fs_sb.h
21 #include <linux/wait.h>
22 #include <linux/blockgroup_lock.h>
23 #include <linux/percpu_counter.h>
24 +#include <linux/list.h>
26 #include <linux/rbtree.h>
27 +#include <linux/proc_fs.h>
29 +struct ext3_buddy_group_blocks;
30 +struct ext3_locality_group;
31 +struct ext3_mb_history;
32 +#define EXT3_BB_MAX_BLOCKS
35 * third extended-fs super-block data in memory
36 Index: linux-2.6.18.8/include/linux/ext3_fs.h
37 ===================================================================
38 --- linux-2.6.18.8.orig/include/linux/ext3_fs.h
39 +++ linux-2.6.18.8/include/linux/ext3_fs.h
41 #define _LINUX_EXT3_FS_H
43 #include <linux/types.h>
44 +#include <linux/ext3_fs_i.h>
47 * The second extended filesystem constants/structures
50 struct ext3_allocation_request {
51 struct inode *inode; /* target inode for block we're allocating */
52 - unsigned long logical; /* logical block in target inode */
53 - unsigned long goal; /* phys. target (a hint) */
54 - unsigned long lleft; /* the closest logical allocated block to the left */
55 - unsigned long pleft; /* phys. block for ^^^ */
56 - unsigned long lright; /* the closest logical allocated block to the right */
57 - unsigned long pright; /* phys. block for ^^^ */
58 + ext3_fsblk_t logical; /* logical block in target inode */
59 + ext3_fsblk_t goal; /* phys. target (a hint) */
60 + ext3_fsblk_t lleft; /* the closest logical allocated block to the left */
61 + ext3_fsblk_t pleft; /* phys. block for ^^^ */
62 + ext3_fsblk_t lright; /* the closest logical allocated block to the right */
63 + ext3_fsblk_t pright; /* phys. block for ^^^ */
64 unsigned long len; /* how many blocks we want to allocate */
65 unsigned long flags; /* flags. see above EXT3_MB_HINT_* */
67 @@ -400,6 +401,7 @@ struct ext3_inode {
68 #define EXT3_MOUNT_IOPEN_NOPRIV 0x800000/* Make iopen world-readable */
69 #define EXT3_MOUNT_EXTENTS 0x2000000/* Extents support */
70 #define EXT3_MOUNT_EXTDEBUG 0x4000000/* Extents debug */
71 +#define EXT3_MOUNT_MBALLOC 0x8000000/* Buddy allocation support */
73 /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
75 @@ -787,12 +789,12 @@ ext3_group_first_block_no(struct super_b
77 extern int ext3_bg_has_super(struct super_block *sb, int group);
78 extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
79 -extern ext3_fsblk_t ext3_new_block (handle_t *handle, struct inode *inode,
80 +extern ext3_fsblk_t ext3_new_block_old (handle_t *handle, struct inode *inode,
81 ext3_fsblk_t goal, int *errp);
82 -extern ext3_fsblk_t ext3_new_blocks (handle_t *handle, struct inode *inode,
83 +extern ext3_fsblk_t ext3_new_blocks_old (handle_t *handle, struct inode *inode,
84 ext3_fsblk_t goal, unsigned long *count, int *errp);
85 extern void ext3_free_blocks (handle_t *handle, struct inode *inode,
86 - ext3_fsblk_t block, unsigned long count);
87 + ext3_fsblk_t block, unsigned long count, int metadata);
88 extern void ext3_free_blocks_sb (handle_t *handle, struct super_block *sb,
89 ext3_fsblk_t block, unsigned long count,
90 unsigned long *pdquot_freed_blocks);
91 @@ -836,15 +838,45 @@ extern long ext3_mb_stats;
92 extern long ext3_mb_max_to_scan;
93 extern int ext3_mb_init(struct super_block *, int);
94 extern int ext3_mb_release(struct super_block *);
95 -extern unsigned long ext3_mb_new_blocks(handle_t *, struct ext3_allocation_request *, int *);
96 +extern ext3_fsblk_t ext3_new_block(handle_t *handle, struct inode *inode,
97 + ext3_fsblk_t goal, int *errp);
98 +extern ext3_fsblk_t ext3_mb_new_blocks(handle_t *,
99 + struct ext3_allocation_request *, int *);
100 extern int ext3_mb_reserve_blocks(struct super_block *, int);
101 extern void ext3_mb_release_blocks(struct super_block *, int);
102 extern void ext3_mb_release_blocks(struct super_block *, int);
103 extern void ext3_mb_discard_inode_preallocations(struct inode *);
104 extern int __init init_ext3_mb_proc(void);
105 extern void exit_ext3_mb_proc(void);
106 -extern void ext3_mb_free_blocks(handle_t *, struct inode *, unsigned long, unsigned long, int, int *);
107 +extern void ext3_mb_free_blocks(handle_t *, struct inode *, unsigned long,
108 + unsigned long, int, unsigned long *);
110 +static inline ext3_fsblk_t ext3_new_blocks(handle_t *handle,
111 + struct inode *inode,
113 + unsigned long *count, int *errp)
115 + struct ext3_allocation_request ar;
118 + if (!test_opt(inode->i_sb, MBALLOC)) {
119 + ret = ext3_new_blocks_old(handle, inode, goal, count, errp);
132 + ret = ext3_mb_new_blocks(handle, &ar, errp);
138 int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode,
139 Index: linux-2.6.18.8/fs/ext3/super.c
140 ===================================================================
141 --- linux-2.6.18.8.orig/fs/ext3/super.c
142 +++ linux-2.6.18.8/fs/ext3/super.c
143 @@ -688,6 +688,7 @@ enum {
144 Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
146 Opt_extents, Opt_noextents, Opt_extdebug,
147 + Opt_mballoc, Opt_nomballoc, Opt_stripe,
150 static match_table_t tokens = {
151 @@ -743,6 +744,9 @@ static match_table_t tokens = {
152 {Opt_extents, "extents"},
153 {Opt_noextents, "noextents"},
154 {Opt_extdebug, "extdebug"},
155 + {Opt_mballoc, "mballoc"},
156 + {Opt_nomballoc, "nomballoc"},
157 + {Opt_stripe, "stripe=%u"},
159 {Opt_resize, "resize"},
161 @@ -1096,6 +1100,19 @@ clear_qf_name:
163 set_opt (sbi->s_mount_opt, EXTDEBUG);
166 + set_opt(sbi->s_mount_opt, MBALLOC);
168 + case Opt_nomballoc:
169 + clear_opt(sbi->s_mount_opt, MBALLOC);
172 + if (match_int(&args[0], &option))
176 + sbi->s_stripe = option;
180 "EXT3-fs: Unrecognized mount option \"%s\" "
181 @@ -1826,6 +1843,7 @@ static int ext3_fill_super (struct super
185 + ext3_mb_init(sb, needs_recovery);
189 Index: linux-2.6.18.8/fs/ext3/extents.c
190 ===================================================================
191 --- linux-2.6.18.8.orig/fs/ext3/extents.c
192 +++ linux-2.6.18.8/fs/ext3/extents.c
193 @@ -801,7 +801,7 @@ cleanup:
194 for (i = 0; i < depth; i++) {
197 - ext3_free_blocks(handle, inode, ablocks[i], 1);
198 + ext3_free_blocks(handle, inode, ablocks[i], 1, 1);
202 @@ -1619,7 +1619,7 @@ int ext3_ext_rm_idx(handle_t *handle, st
203 ext_debug(inode, "index is empty, remove it, free block %lu\n", leaf);
204 bh = sb_find_get_block(inode->i_sb, leaf);
205 ext3_forget(handle, 1, inode, bh, leaf);
206 - ext3_free_blocks(handle, inode, leaf, 1);
207 + ext3_free_blocks(handle, inode, leaf, 1, 1);
211 @@ -1678,7 +1678,7 @@ static int ext3_remove_blocks(handle_t *
212 unsigned long from, unsigned long to)
214 struct buffer_head *bh;
216 + int i, metadata = 0;
220 @@ -1696,6 +1696,8 @@ static int ext3_remove_blocks(handle_t *
221 spin_unlock(&sbi->s_ext_stats_lock);
224 + if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))
226 if (from >= le32_to_cpu(ex->ee_block)
227 && to == le32_to_cpu(ex->ee_block) + le16_to_cpu(ex->ee_len) - 1) {
229 @@ -1707,7 +1709,7 @@ static int ext3_remove_blocks(handle_t *
230 bh = sb_find_get_block(inode->i_sb, start + i);
231 ext3_forget(handle, 0, inode, bh, start + i);
233 - ext3_free_blocks(handle, inode, start, num);
234 + ext3_free_blocks(handle, inode, start, num, metadata);
235 } else if (from == le32_to_cpu(ex->ee_block)
236 && to <= le32_to_cpu(ex->ee_block) + le16_to_cpu(ex->ee_len) - 1) {
237 printk("strange request: removal %lu-%lu from %u:%u\n",
238 @@ -2040,7 +2042,7 @@ int ext3_ext_get_blocks(handle_t *handle
239 struct ext3_extent newex, *ex;
240 int goal, newblock, err = 0, depth;
241 unsigned long allocated = 0;
242 - unsigned long next;
243 + struct ext3_allocation_request ar;
245 __clear_bit(BH_New, &bh_result->b_state);
246 ext_debug(inode, "blocks %d/%lu requested for inode %u\n", (int) iblock,
247 @@ -2122,18 +2124,36 @@ int ext3_ext_get_blocks(handle_t *handle
248 if (S_ISREG(inode->i_mode) && (!EXT3_I(inode)->i_block_alloc_info))
249 ext3_init_block_alloc_info(inode);
251 + /* find neighbour allocated blocks */
253 + err = ext3_ext_search_left(inode, path, &ar.lleft, &ar.pleft);
256 + ar.lright = iblock;
257 + err = ext3_ext_search_right(inode, path, &ar.lright, &ar.pright);
261 /* find next allocated block so that we know how many
262 * blocks we can allocate without ovelapping next extent */
263 - BUG_ON(iblock < le32_to_cpu(ex->ee_block) + le16_to_cpu(ex->ee_len));
264 - next = ext3_ext_next_allocated_block(path);
265 - BUG_ON(next <= iblock);
266 - allocated = next - iblock;
267 + BUG_ON(ar.pright != 0 && ar.lright <= iblock);
268 + if (ar.pright == 0)
269 + allocated = EXT_MAX_BLOCK - iblock;
271 + allocated = ar.lright - iblock;
272 if (allocated > max_blocks)
273 allocated = max_blocks;
275 /* allocate new block */
276 - goal = ext3_ext_find_goal(inode, path, iblock);
277 - newblock = ext3_new_blocks(handle, inode, goal, &allocated, &err);
279 + ar.goal = ext3_ext_find_goal(inode, path, iblock);
280 + ar.logical = iblock;
281 + ar.len = allocated;
282 + if (S_ISREG(inode->i_mode))
283 + ar.flags = EXT3_MB_HINT_DATA;
286 + newblock = ext3_mb_new_blocks(handle, &ar, &err);
289 ext_debug(inode, "allocate new block: goal %d, found %d/%lu\n",
290 @@ -2143,12 +2163,16 @@ int ext3_ext_get_blocks(handle_t *handle
291 newex.ee_block = cpu_to_le32(iblock);
292 newex.ee_start = cpu_to_le32(newblock);
293 newex.ee_start_hi = 0;
294 - newex.ee_len = cpu_to_le16(allocated);
295 + newex.ee_len = cpu_to_le16(ar.len);
296 err = ext3_ext_insert_extent(handle, inode, path, &newex);
298 /* free data blocks we just allocated */
299 - ext3_free_blocks(handle, inode, le32_to_cpu(newex.ee_start),
300 - le16_to_cpu(newex.ee_len));
301 + /* not a good idea to call discard here directly,
302 + * but otherwise we'd need to call it every free() */
303 + ext3_mb_discard_inode_preallocations(inode);
304 + ext3_free_blocks(handle, inode, newex.ee_start,
310 @@ -2157,6 +2181,7 @@ int ext3_ext_get_blocks(handle_t *handle
312 /* previous routine could use block we allocated */
313 newblock = le32_to_cpu(newex.ee_start);
314 + allocated = le16_to_cpu(newex.ee_len);
315 __set_bit(BH_New, &bh_result->b_state);
317 ext3_ext_put_in_cache(inode, iblock, allocated, newblock,
318 @@ -2208,6 +2233,9 @@ void ext3_ext_truncate(struct inode * in
319 mutex_lock(&EXT3_I(inode)->truncate_mutex);
320 ext3_ext_invalidate_cache(inode);
322 + /* it's important to discard preallocations under truncate_mutex */
323 + ext3_mb_discard_inode_preallocations(inode);
326 * TODO: optimization is possible here
327 * probably we need not scaning at all,
328 Index: linux-2.6.18.8/fs/ext3/Makefile
329 ===================================================================
330 --- linux-2.6.18.8.orig/fs/ext3/Makefile
331 +++ linux-2.6.18.8/fs/ext3/Makefile
333 obj-$(CONFIG_EXT3_FS) += ext3.o
335 ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
336 - ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o
337 + ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o mballoc.o
339 ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o
340 ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
341 Index: linux-2.6.18.8/fs/ext3/xattr.c
342 ===================================================================
343 --- linux-2.6.18.8.orig/fs/ext3/xattr.c
344 +++ linux-2.6.18.8/fs/ext3/xattr.c
345 @@ -484,7 +484,7 @@ ext3_xattr_release_block(handle_t *handl
346 ea_bdebug(bh, "refcount now=0; freeing");
348 mb_cache_entry_free(ce);
349 - ext3_free_blocks(handle, inode, bh->b_blocknr, 1);
350 + ext3_free_blocks(handle, inode, bh->b_blocknr, 1, 1);
352 ext3_forget(handle, 1, inode, bh, bh->b_blocknr);
354 @@ -805,7 +805,7 @@ inserted:
355 new_bh = sb_getblk(sb, block);
358 - ext3_free_blocks(handle, inode, block, 1);
359 + ext3_free_blocks(handle, inode, block, 1, 1);
363 Index: linux-2.6.18.8/fs/ext3/balloc.c
364 ===================================================================
365 --- linux-2.6.18.8.orig/fs/ext3/balloc.c
366 +++ linux-2.6.18.8/fs/ext3/balloc.c
367 @@ -79,7 +79,7 @@ struct ext3_group_desc * ext3_get_group_
369 * Return buffer_head on success or NULL in case of failure.
371 -static struct buffer_head *
372 +struct buffer_head *
373 read_block_bitmap(struct super_block *sb, unsigned int block_group)
375 struct ext3_group_desc * desc;
376 @@ -294,6 +294,8 @@ void ext3_discard_reservation(struct ino
377 struct ext3_reserve_window_node *rsv;
378 spinlock_t *rsv_lock = &EXT3_SB(inode->i_sb)->s_rsv_window_lock;
380 + ext3_mb_discard_inode_preallocations(inode);
385 @@ -490,21 +492,25 @@ error_return:
389 -/* Free given blocks, update quota and i_blocks field */
390 void ext3_free_blocks(handle_t *handle, struct inode *inode,
391 - ext3_fsblk_t block, unsigned long count)
392 + ext3_fsblk_t block, unsigned long count, int metadata)
394 - struct super_block * sb;
395 - unsigned long dquot_freed_blocks;
396 + struct super_block *sb;
397 + unsigned long freed;
399 + /* this isn't the right place to decide whether block is metadata
400 + * inode.c/extents.c knows better, but for safety ... */
401 + if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode) ||
402 + ext3_should_journal_data(inode))
407 - printk ("ext3_free_blocks: nonexistent device");
410 - ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks);
411 - if (dquot_freed_blocks)
412 - DQUOT_FREE_BLOCK(inode, dquot_freed_blocks);
413 + if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info)
414 + ext3_free_blocks_sb(handle, sb, block, count, &freed);
416 + ext3_mb_free_blocks(handle, inode, block, count, metadata, &freed);
418 + DQUOT_FREE_BLOCK(inode, freed);
422 @@ -1199,7 +1205,7 @@ int ext3_should_retry_alloc(struct super
423 * bitmap, and then for any free bit if that fails.
424 * This function also updates quota and i_blocks field.
426 -ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode,
427 +ext3_fsblk_t ext3_new_blocks_old(handle_t *handle, struct inode *inode,
428 ext3_fsblk_t goal, unsigned long *count, int *errp)
430 struct buffer_head *bitmap_bh = NULL;
431 @@ -1463,7 +1469,7 @@ out:
435 -ext3_fsblk_t ext3_new_block(handle_t *handle, struct inode *inode,
436 +ext3_fsblk_t ext3_new_block_old(handle_t *handle, struct inode *inode,
437 ext3_fsblk_t goal, int *errp)
439 unsigned long count = 1;
440 Index: linux-2.6.18.8/fs/ext3/inode.c
441 ===================================================================
442 --- linux-2.6.18.8.orig/fs/ext3/inode.c
443 +++ linux-2.6.18.8/fs/ext3/inode.c
444 @@ -560,7 +560,7 @@ static int ext3_alloc_blocks(handle_t *h
447 for (i = 0; i <index; i++)
448 - ext3_free_blocks(handle, inode, new_blocks[i], 1);
449 + ext3_free_blocks(handle, inode, new_blocks[i], 1, 0);
453 @@ -659,9 +659,9 @@ failed:
454 ext3_journal_forget(handle, branch[i].bh);
456 for (i = 0; i <indirect_blks; i++)
457 - ext3_free_blocks(handle, inode, new_blocks[i], 1);
458 + ext3_free_blocks(handle, inode, new_blocks[i], 1, 0);
460 - ext3_free_blocks(handle, inode, new_blocks[i], num);
461 + ext3_free_blocks(handle, inode, new_blocks[i], num, 0);
465 @@ -758,9 +758,10 @@ err_out:
466 for (i = 1; i <= num; i++) {
467 BUFFER_TRACE(where[i].bh, "call journal_forget");
468 ext3_journal_forget(handle, where[i].bh);
469 - ext3_free_blocks(handle,inode,le32_to_cpu(where[i-1].key),1);
470 + ext3_free_blocks(handle,inode,le32_to_cpu(where[i-1].key), 1,
473 - ext3_free_blocks(handle, inode, le32_to_cpu(where[num].key), blks);
474 + ext3_free_blocks(handle, inode, le32_to_cpu(where[num].key), blks, 0);
478 @@ -1996,7 +1997,7 @@ static void ext3_clear_blocks(handle_t *
482 - ext3_free_blocks(handle, inode, block_to_free, count);
483 + ext3_free_blocks(handle, inode, block_to_free, count, 0);
487 @@ -2169,7 +2170,7 @@ static void ext3_free_branches(handle_t
488 ext3_journal_test_restart(handle, inode);
491 - ext3_free_blocks(handle, inode, nr, 1);
492 + ext3_free_blocks(handle, inode, nr, 1, 1);
496 Index: linux-2.6.18.8/fs/ext3/mballoc.c
497 ===================================================================
498 --- linux-2.6.18.8.orig/fs/ext3/mballoc.c
499 +++ linux-2.6.18.8/fs/ext3/mballoc.c
500 @@ -350,8 +350,8 @@ struct ext3_prealloc_space {
504 - unsigned long pa_pstart; /* phys. block */
505 - unsigned long pa_lstart; /* log. block */
506 + ext3_fsblk_t pa_pstart; /* phys. block */
507 + ext3_fsblk_t pa_lstart; /* log. block */
508 unsigned short pa_len; /* len of preallocated chunk */
509 unsigned short pa_free; /* how many blocks are free */
510 unsigned short pa_linear; /* consumed in one direction
511 @@ -460,8 +460,8 @@ static struct proc_dir_entry *proc_root_
513 int ext3_create (struct inode *, struct dentry *, int, struct nameidata *);
514 struct buffer_head * read_block_bitmap(struct super_block *, unsigned int);
515 -unsigned long ext3_new_blocks_old(handle_t *handle, struct inode *inode,
516 - unsigned long goal, unsigned long *count, int *errp);
517 +ext3_fsblk_t ext3_new_blocks_old(handle_t *handle, struct inode *inode,
518 + ext3_fsblk_t goal, unsigned long *count, int *errp);
519 void ext3_mb_release_blocks(struct super_block *, int);
520 void ext3_mb_poll_new_transaction(struct super_block *, handle_t *);
521 void ext3_mb_free_committed_blocks(struct super_block *);
522 @@ -479,7 +479,7 @@ int ext3_mb_destroy_per_dev_proc(struct
523 * Calculate the block group number and offset, given a block number
525 static void ext3_get_group_no_and_offset(struct super_block *sb,
526 - unsigned long blocknr,
527 + ext3_fsblk_t blocknr,
528 unsigned long *blockgrpp,
529 unsigned long *offsetp)
531 @@ -517,12 +517,12 @@ ext3_is_group_locked(struct super_block
532 &EXT3_GROUP_INFO(sb, group)->bb_state);
535 -unsigned long ext3_grp_offs_to_block(struct super_block *sb,
536 +ext3_fsblk_t ext3_grp_offs_to_block(struct super_block *sb,
537 struct ext3_free_extent *fex)
539 - unsigned long block;
540 + ext3_fsblk_t block;
542 - block = (unsigned long) fex->fe_group * EXT3_BLOCKS_PER_GROUP(sb)
543 + block = (ext3_fsblk_t) fex->fe_group * EXT3_BLOCKS_PER_GROUP(sb)
545 + le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block);
547 @@ -3202,7 +3202,7 @@ void ext3_mb_collect_stats(struct ext3_a
548 void ext3_mb_use_inode_pa(struct ext3_allocation_context *ac,
549 struct ext3_prealloc_space *pa)
551 - unsigned long start, len;
552 + ext3_fsblk_t start, len;
554 /* found preallocated blocks, use them */
555 start = pa->pa_pstart + (ac->ac_o_ex.fe_logical - pa->pa_lstart);
556 @@ -4053,13 +4053,13 @@ int ext3_mb_discard_preallocations(struc
557 * it tries to use preallocation first, then falls back
558 * to usual allocation
560 -unsigned long ext3_mb_new_blocks(handle_t *handle,
561 +ext3_fsblk_t ext3_mb_new_blocks(handle_t *handle,
562 struct ext3_allocation_request *ar, int *errp)
564 struct ext3_allocation_context ac;
565 struct ext3_sb_info *sbi;
566 struct super_block *sb;
567 - unsigned long block = 0;
568 + ext3_fsblk_t block = 0;
571 sb = ar->inode->i_sb;
572 @@ -4070,8 +4070,8 @@ unsigned long ext3_mb_new_blocks(handle_
573 if (ext3_mballoc_warning++ == 0)
574 printk(KERN_ERR "EXT3-fs: multiblock request with "
575 "mballoc disabled!\n");
577 - block = ext3_new_block_old(handle, ar->inode, ar->goal, errp);
578 + block = ext3_new_blocks_old(handle, ar->inode, ar->goal,
583 @@ -4135,11 +4135,11 @@ out:
585 EXPORT_SYMBOL(ext3_mb_new_blocks);
587 -int ext3_new_block(handle_t *handle, struct inode *inode,
588 - unsigned long goal, int *errp)
589 +ext3_fsblk_t ext3_new_block(handle_t *handle, struct inode *inode,
590 + ext3_fsblk_t goal, int *errp)
592 struct ext3_allocation_request ar;
596 if (!test_opt(inode->i_sb, MBALLOC)) {
597 ret = ext3_new_block_old(handle, inode, goal, errp);
598 @@ -4254,8 +4254,8 @@ int ext3_mb_free_metadata(handle_t *hand
599 * Main entry point into mballoc to free blocks
601 void ext3_mb_free_blocks(handle_t *handle, struct inode *inode,
602 - unsigned long block, unsigned long count,
603 - int metadata, int *freed)
604 + ext3_fsblk_t block, unsigned long count,
605 + int metadata, unsigned long *freed)
607 struct buffer_head *bitmap_bh = NULL;
608 struct super_block *sb = inode->i_sb;