diff options
author | Jeff Mahoney <jeffm@suse.com> | 2007-10-19 02:39:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:35 -0400 |
commit | 3ee1667042c350003b9d3f35e5666cc8c43ce8aa (patch) | |
tree | 331217461b684c298397d7347431c500c5969148 /fs/reiserfs/inode.c | |
parent | 6c57c2c8d3862c8d5b908669654f6565da74ec19 (diff) |
reiserfs: fix usage of signed ints for block numbers
Do a quick signedness check for block numbers. There are a number of places
where signed integers are used for block numbers, which limits the usable file
system size to 8 TiB. The disk format, excepting a problem which will be
fixed in the following patch, supports file systems up to 16 TiB in size.
This patch cleans up those sites so that we can enable the full usable size.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs/inode.c')
-rw-r--r-- | fs/reiserfs/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 0804289d355d..a991af96f3f0 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -199,7 +199,7 @@ static inline void set_block_dev_mapped(struct buffer_head *bh, | |||
199 | // files which were created in the earlier version can not be longer, | 199 | // files which were created in the earlier version can not be longer, |
200 | // than 2 gb | 200 | // than 2 gb |
201 | // | 201 | // |
202 | static int file_capable(struct inode *inode, long block) | 202 | static int file_capable(struct inode *inode, sector_t block) |
203 | { | 203 | { |
204 | if (get_inode_item_key_version(inode) != KEY_FORMAT_3_5 || // it is new file. | 204 | if (get_inode_item_key_version(inode) != KEY_FORMAT_3_5 || // it is new file. |
205 | block < (1 << (31 - inode->i_sb->s_blocksize_bits))) // old file, but 'block' is inside of 2gb | 205 | block < (1 << (31 - inode->i_sb->s_blocksize_bits))) // old file, but 'block' is inside of 2gb |
@@ -242,7 +242,7 @@ static int restart_transaction(struct reiserfs_transaction_handle *th, | |||
242 | // Please improve the english/clarity in the comment above, as it is | 242 | // Please improve the english/clarity in the comment above, as it is |
243 | // hard to understand. | 243 | // hard to understand. |
244 | 244 | ||
245 | static int _get_block_create_0(struct inode *inode, long block, | 245 | static int _get_block_create_0(struct inode *inode, sector_t block, |
246 | struct buffer_head *bh_result, int args) | 246 | struct buffer_head *bh_result, int args) |
247 | { | 247 | { |
248 | INITIALIZE_PATH(path); | 248 | INITIALIZE_PATH(path); |
@@ -250,7 +250,7 @@ static int _get_block_create_0(struct inode *inode, long block, | |||
250 | struct buffer_head *bh; | 250 | struct buffer_head *bh; |
251 | struct item_head *ih, tmp_ih; | 251 | struct item_head *ih, tmp_ih; |
252 | int fs_gen; | 252 | int fs_gen; |
253 | int blocknr; | 253 | b_blocknr_t blocknr; |
254 | char *p = NULL; | 254 | char *p = NULL; |
255 | int chars; | 255 | int chars; |
256 | int ret; | 256 | int ret; |
@@ -569,7 +569,7 @@ static int convert_tail_for_hole(struct inode *inode, | |||
569 | } | 569 | } |
570 | 570 | ||
571 | static inline int _allocate_block(struct reiserfs_transaction_handle *th, | 571 | static inline int _allocate_block(struct reiserfs_transaction_handle *th, |
572 | long block, | 572 | sector_t block, |
573 | struct inode *inode, | 573 | struct inode *inode, |
574 | b_blocknr_t * allocated_block_nr, | 574 | b_blocknr_t * allocated_block_nr, |
575 | struct treepath *path, int flags) | 575 | struct treepath *path, int flags) |