summaryrefslogtreecommitdiff
path: root/include/linux/ext3_fs.h
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2006-03-26 13:37:57 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 20:57:01 +0400
commitb54e41ec17ae91dce174eb5a3515e7af4a440d42 (patch)
treeaa98a38e05188b204950eb0756fb792675951b0d /include/linux/ext3_fs.h
parentb47b24781c59565f45acd765dc995a752d561e96 (diff)
downloadlinux-b54e41ec17ae91dce174eb5a3515e7af4a440d42.tar.xz
[PATCH] ext3_get_blocks: support multiple blocks allocation in ext3_new_block()
Change ext3_try_to_allocate() (called via ext3_new_blocks()) to try to allocate the requested number of blocks on a best effort basis: After allocated the first block, it will always attempt to allocate the next few(up to the requested size and not beyond the reservation window) adjacent blocks at the same time. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/ext3_fs.h')
-rw-r--r--include/linux/ext3_fs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index 0adadd85fa66..8bb4f842cded 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -36,7 +36,8 @@ struct statfs;
* Define EXT3_RESERVATION to reserve data blocks for expanding files
*/
#define EXT3_DEFAULT_RESERVE_BLOCKS 8
-#define EXT3_MAX_RESERVE_BLOCKS 1024
+/*max window size: 1024(direct blocks) + 3([t,d]indirect blocks) */
+#define EXT3_MAX_RESERVE_BLOCKS 1027
#define EXT3_RESERVE_WINDOW_NOT_ALLOCATED 0
/*
* Always enable hashed directories
@@ -732,6 +733,8 @@ struct dir_private_info {
extern int ext3_bg_has_super(struct super_block *sb, int group);
extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *);
+extern int ext3_new_blocks (handle_t *, struct inode *, unsigned long,
+ unsigned long *, int *);
extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long,
unsigned long);
extern void ext3_free_blocks_sb (handle_t *, struct super_block *,