aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-11-05 00:14:04 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-11-05 00:14:04 -0500
commit498e5f24158da7bf8fa48074a70e370e22844492 (patch)
tree1434b349c8eca3b0667af0b385533cbcd599c1c3 /fs/ext4/ext4.h
parenta9df9a49102f3578909cba7bd33784eb3b9caaa4 (diff)
ext4: Change unsigned long to unsigned int
Convert the unsigned longs that are most responsible for bloating the stack usage on 64-bit systems. Nearly all places in the ext3/4 code which uses "unsigned long" is probably a bug, since on 32-bit systems a ulong a 32-bits, which means we are wasting stack space on 64-bit systems. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index e9aacecfbf41..558545d1fead 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -94,9 +94,9 @@ struct ext4_allocation_request {
94 /* phys. block for ^^^ */ 94 /* phys. block for ^^^ */
95 ext4_fsblk_t pright; 95 ext4_fsblk_t pright;
96 /* how many blocks we want to allocate */ 96 /* how many blocks we want to allocate */
97 unsigned long len; 97 unsigned int len;
98 /* flags. see above EXT4_MB_HINT_* */ 98 /* flags. see above EXT4_MB_HINT_* */
99 unsigned long flags; 99 unsigned int flags;
100}; 100};
101 101
102/* 102/*
@@ -997,6 +997,9 @@ do { \
997# define ATTRIB_NORET __attribute__((noreturn)) 997# define ATTRIB_NORET __attribute__((noreturn))
998# define NORET_AND noreturn, 998# define NORET_AND noreturn,
999 999
1000/* bitmap.c */
1001extern unsigned int ext4_count_free(struct buffer_head *, unsigned);
1002
1000/* balloc.c */ 1003/* balloc.c */
1001extern unsigned int ext4_block_group(struct super_block *sb, 1004extern unsigned int ext4_block_group(struct super_block *sb,
1002 ext4_fsblk_t blocknr); 1005 ext4_fsblk_t blocknr);
@@ -1024,7 +1027,7 @@ extern int ext4_should_retry_alloc(struct super_block *sb, int *retries);
1024/* dir.c */ 1027/* dir.c */
1025extern int ext4_check_dir_entry(const char *, struct inode *, 1028extern int ext4_check_dir_entry(const char *, struct inode *,
1026 struct ext4_dir_entry_2 *, 1029 struct ext4_dir_entry_2 *,
1027 struct buffer_head *, unsigned long); 1030 struct buffer_head *, unsigned int);
1028extern int ext4_htree_store_dirent(struct file *dir_file, __u32 hash, 1031extern int ext4_htree_store_dirent(struct file *dir_file, __u32 hash,
1029 __u32 minor_hash, 1032 __u32 minor_hash,
1030 struct ext4_dir_entry_2 *dirent); 1033 struct ext4_dir_entry_2 *dirent);
@@ -1044,7 +1047,6 @@ extern struct inode * ext4_orphan_get(struct super_block *, unsigned long);
1044extern unsigned long ext4_count_free_inodes(struct super_block *); 1047extern unsigned long ext4_count_free_inodes(struct super_block *);
1045extern unsigned long ext4_count_dirs(struct super_block *); 1048extern unsigned long ext4_count_dirs(struct super_block *);
1046extern void ext4_check_inodes_bitmap(struct super_block *); 1049extern void ext4_check_inodes_bitmap(struct super_block *);
1047extern unsigned long ext4_count_free(struct buffer_head *, unsigned);
1048 1050
1049/* mballoc.c */ 1051/* mballoc.c */
1050extern long ext4_mb_stats; 1052extern long ext4_mb_stats;
@@ -1074,10 +1076,6 @@ struct buffer_head *ext4_bread(handle_t *, struct inode *,
1074 ext4_lblk_t, int, int *); 1076 ext4_lblk_t, int, int *);
1075int ext4_get_block(struct inode *inode, sector_t iblock, 1077int ext4_get_block(struct inode *inode, sector_t iblock,
1076 struct buffer_head *bh_result, int create); 1078 struct buffer_head *bh_result, int create);
1077int ext4_get_blocks_handle(handle_t *handle, struct inode *inode,
1078 ext4_lblk_t iblock, unsigned long maxblocks,
1079 struct buffer_head *bh_result,
1080 int create, int extend_disksize);
1081 1079
1082extern struct inode *ext4_iget(struct super_block *, unsigned long); 1080extern struct inode *ext4_iget(struct super_block *, unsigned long);
1083extern int ext4_write_inode(struct inode *, int); 1081extern int ext4_write_inode(struct inode *, int);
@@ -1276,16 +1274,16 @@ extern int ext4_ext_writepage_trans_blocks(struct inode *, int);
1276extern int ext4_ext_index_trans_blocks(struct inode *inode, int nrblocks, 1274extern int ext4_ext_index_trans_blocks(struct inode *inode, int nrblocks,
1277 int chunk); 1275 int chunk);
1278extern int ext4_ext_get_blocks(handle_t *handle, struct inode *inode, 1276extern int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
1279 ext4_lblk_t iblock, 1277 ext4_lblk_t iblock, unsigned int max_blocks,
1280 unsigned long max_blocks, struct buffer_head *bh_result, 1278 struct buffer_head *bh_result,
1281 int create, int extend_disksize); 1279 int create, int extend_disksize);
1282extern void ext4_ext_truncate(struct inode *); 1280extern void ext4_ext_truncate(struct inode *);
1283extern void ext4_ext_init(struct super_block *); 1281extern void ext4_ext_init(struct super_block *);
1284extern void ext4_ext_release(struct super_block *); 1282extern void ext4_ext_release(struct super_block *);
1285extern long ext4_fallocate(struct inode *inode, int mode, loff_t offset, 1283extern long ext4_fallocate(struct inode *inode, int mode, loff_t offset,
1286 loff_t len); 1284 loff_t len);
1287extern int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, 1285extern int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode,
1288 sector_t block, unsigned long max_blocks, 1286 sector_t block, unsigned int max_blocks,
1289 struct buffer_head *bh, int create, 1287 struct buffer_head *bh, int create,
1290 int extend_disksize, int flag); 1288 int extend_disksize, int flag);
1291#endif /* __KERNEL__ */ 1289#endif /* __KERNEL__ */