aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ext4_fs.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2008-01-28 23:58:27 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-01-28 23:58:27 -0500
commit725d26d3f09ccb5bac4b4293096b985a312a0d67 (patch)
tree1c49a07da252832fc6842c88a2359e8cd43af636 /include/linux/ext4_fs.h
parenta72d7f834e1afa08421938d7eb06bd8e56b0e58c (diff)
ext4: Introduce ext4_lblk_t
This patch adds a new data type ext4_lblk_t to represent the logical file blocks. This is the preparatory patch to support large files in ext4 The follow up patch with convert the ext4_inode i_blocks to represent the number of blocks in file system block size. This changes makes it possible to have a block number 2**32 -1 which will result in overflow if the block number is represented by signed long. This patch convert all the block number to type ext4_lblk_t which is typedef to __u32 Also remove dead code ext4_ext_walk_space Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'include/linux/ext4_fs.h')
-rw-r--r--include/linux/ext4_fs.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h
index fb31c1aba989..5e2da0974d16 100644
--- a/include/linux/ext4_fs.h
+++ b/include/linux/ext4_fs.h
@@ -935,11 +935,14 @@ extern unsigned long ext4_count_free (struct buffer_head *, unsigned);
935/* inode.c */ 935/* inode.c */
936int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, 936int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
937 struct buffer_head *bh, ext4_fsblk_t blocknr); 937 struct buffer_head *bh, ext4_fsblk_t blocknr);
938struct buffer_head * ext4_getblk (handle_t *, struct inode *, long, int, int *); 938struct buffer_head *ext4_getblk(handle_t *, struct inode *,
939struct buffer_head * ext4_bread (handle_t *, struct inode *, int, int, int *); 939 ext4_lblk_t, int, int *);
940struct buffer_head *ext4_bread(handle_t *, struct inode *,
941 ext4_lblk_t, int, int *);
940int ext4_get_blocks_handle(handle_t *handle, struct inode *inode, 942int ext4_get_blocks_handle(handle_t *handle, struct inode *inode,
941 sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result, 943 ext4_lblk_t iblock, unsigned long maxblocks,
942 int create, int extend_disksize); 944 struct buffer_head *bh_result,
945 int create, int extend_disksize);
943 946
944extern void ext4_read_inode (struct inode *); 947extern void ext4_read_inode (struct inode *);
945extern int ext4_write_inode (struct inode *, int); 948extern int ext4_write_inode (struct inode *, int);
@@ -1068,7 +1071,7 @@ extern const struct inode_operations ext4_fast_symlink_inode_operations;
1068extern int ext4_ext_tree_init(handle_t *handle, struct inode *); 1071extern int ext4_ext_tree_init(handle_t *handle, struct inode *);
1069extern int ext4_ext_writepage_trans_blocks(struct inode *, int); 1072extern int ext4_ext_writepage_trans_blocks(struct inode *, int);
1070extern int ext4_ext_get_blocks(handle_t *handle, struct inode *inode, 1073extern int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
1071 ext4_fsblk_t iblock, 1074 ext4_lblk_t iblock,
1072 unsigned long max_blocks, struct buffer_head *bh_result, 1075 unsigned long max_blocks, struct buffer_head *bh_result,
1073 int create, int extend_disksize); 1076 int create, int extend_disksize);
1074extern void ext4_ext_truncate(struct inode *, struct page *); 1077extern void ext4_ext_truncate(struct inode *, struct page *);
@@ -1081,11 +1084,17 @@ ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, sector_t block,
1081 unsigned long max_blocks, struct buffer_head *bh, 1084 unsigned long max_blocks, struct buffer_head *bh,
1082 int create, int extend_disksize) 1085 int create, int extend_disksize)
1083{ 1086{
1084 if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL) 1087 int retval;
1085 return ext4_ext_get_blocks(handle, inode, block, max_blocks, 1088 if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL) {
1086 bh, create, extend_disksize); 1089 retval = ext4_ext_get_blocks(handle, inode,
1087 return ext4_get_blocks_handle(handle, inode, block, max_blocks, bh, 1090 (ext4_lblk_t)block, max_blocks,
1088 create, extend_disksize); 1091 bh, create, extend_disksize);
1092 } else {
1093 retval = ext4_get_blocks_handle(handle, inode,
1094 (ext4_lblk_t)block, max_blocks,
1095 bh, create, extend_disksize);
1096 }
1097 return retval;
1089} 1098}
1090 1099
1091 1100