aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/reiserfs_fs.h
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2007-10-19 02:39:25 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:35 -0400
commit3ee1667042c350003b9d3f35e5666cc8c43ce8aa (patch)
tree331217461b684c298397d7347431c500c5969148 /include/linux/reiserfs_fs.h
parent6c57c2c8d3862c8d5b908669654f6565da74ec19 (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 'include/linux/reiserfs_fs.h')
-rw-r--r--include/linux/reiserfs_fs.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 8dcf237d3386..69a3e12cb8c8 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1734,8 +1734,8 @@ int journal_end_sync(struct reiserfs_transaction_handle *, struct super_block *,
1734int journal_mark_freed(struct reiserfs_transaction_handle *, 1734int journal_mark_freed(struct reiserfs_transaction_handle *,
1735 struct super_block *, b_blocknr_t blocknr); 1735 struct super_block *, b_blocknr_t blocknr);
1736int journal_transaction_should_end(struct reiserfs_transaction_handle *, int); 1736int journal_transaction_should_end(struct reiserfs_transaction_handle *, int);
1737int reiserfs_in_journal(struct super_block *p_s_sb, int bmap_nr, int bit_nr, 1737int reiserfs_in_journal(struct super_block *p_s_sb, unsigned int bmap_nr,
1738 int searchall, b_blocknr_t * next); 1738 int bit_nr, int searchall, b_blocknr_t *next);
1739int journal_begin(struct reiserfs_transaction_handle *, 1739int journal_begin(struct reiserfs_transaction_handle *,
1740 struct super_block *p_s_sb, unsigned long); 1740 struct super_block *p_s_sb, unsigned long);
1741int journal_join_abort(struct reiserfs_transaction_handle *, 1741int journal_join_abort(struct reiserfs_transaction_handle *,
@@ -1743,7 +1743,7 @@ int journal_join_abort(struct reiserfs_transaction_handle *,
1743void reiserfs_journal_abort(struct super_block *sb, int errno); 1743void reiserfs_journal_abort(struct super_block *sb, int errno);
1744void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...); 1744void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...);
1745int reiserfs_allocate_list_bitmaps(struct super_block *s, 1745int reiserfs_allocate_list_bitmaps(struct super_block *s,
1746 struct reiserfs_list_bitmap *, int); 1746 struct reiserfs_list_bitmap *, unsigned int);
1747 1747
1748void add_save_link(struct reiserfs_transaction_handle *th, 1748void add_save_link(struct reiserfs_transaction_handle *th,
1749 struct inode *inode, int truncate); 1749 struct inode *inode, int truncate);
@@ -2041,7 +2041,7 @@ struct buffer_head *get_FEB(struct tree_balance *);
2041 * arguments, such as node, search path, transaction_handle, etc. */ 2041 * arguments, such as node, search path, transaction_handle, etc. */
2042struct __reiserfs_blocknr_hint { 2042struct __reiserfs_blocknr_hint {
2043 struct inode *inode; /* inode passed to allocator, if we allocate unf. nodes */ 2043 struct inode *inode; /* inode passed to allocator, if we allocate unf. nodes */
2044 long block; /* file offset, in blocks */ 2044 sector_t block; /* file offset, in blocks */
2045 struct in_core_key key; 2045 struct in_core_key key;
2046 struct treepath *path; /* search path, used by allocator to deternine search_start by 2046 struct treepath *path; /* search path, used by allocator to deternine search_start by
2047 * various ways */ 2047 * various ways */
@@ -2099,7 +2099,8 @@ static inline int reiserfs_new_form_blocknrs(struct tree_balance *tb,
2099static inline int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle 2099static inline int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle
2100 *th, struct inode *inode, 2100 *th, struct inode *inode,
2101 b_blocknr_t * new_blocknrs, 2101 b_blocknr_t * new_blocknrs,
2102 struct treepath *path, long block) 2102 struct treepath *path,
2103 sector_t block)
2103{ 2104{
2104 reiserfs_blocknr_hint_t hint = { 2105 reiserfs_blocknr_hint_t hint = {
2105 .th = th, 2106 .th = th,
@@ -2116,7 +2117,8 @@ static inline int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle
2116static inline int reiserfs_new_unf_blocknrs2(struct reiserfs_transaction_handle 2117static inline int reiserfs_new_unf_blocknrs2(struct reiserfs_transaction_handle
2117 *th, struct inode *inode, 2118 *th, struct inode *inode,
2118 b_blocknr_t * new_blocknrs, 2119 b_blocknr_t * new_blocknrs,
2119 struct treepath *path, long block) 2120 struct treepath *path,
2121 sector_t block)
2120{ 2122{
2121 reiserfs_blocknr_hint_t hint = { 2123 reiserfs_blocknr_hint_t hint = {
2122 .th = th, 2124 .th = th,