diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-07-10 10:01:40 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-10 10:01:40 -0700 |
| commit | 9ed052e6a35d94407261378e0be7c33aeeba9734 (patch) | |
| tree | 87252bff0987dcc21a20420e08023d3560e262e7 /include/linux | |
| parent | 0b124d821bb84b04706c6a98373b54fb3cb20c20 (diff) | |
[PATCH] fix reiserfs for 64bit arches
From: Oleg Drokin <green@namesys.com>
From the time of reiserfs_file_write inclusion all 64bit arches were not
able to work with reiserfs for pretty stupid reason (incorrect "unsigned
long" definition of blocknumber type).
This fixes the problem.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/reiserfs_fs.h | 12 | ||||
| -rw-r--r-- | include/linux/reiserfs_fs_sb.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index c8053e862da2..f023954dd085 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h @@ -269,7 +269,7 @@ int is_reiserfs_jr (struct reiserfs_super_block * rs); #define NO_BALANCING_NEEDED (-4) #define NO_MORE_UNUSED_CONTIGUOUS_BLOCKS (-5) -typedef unsigned long b_blocknr_t; +typedef __u32 b_blocknr_t; typedef __u32 unp_t; struct unfm_nodeinfo { @@ -570,7 +570,7 @@ extern void reiserfs_warning (const char * fmt, ...); static inline int uniqueness2type (__u32 uniqueness) CONSTF; static inline int uniqueness2type (__u32 uniqueness) { - switch (uniqueness) { + switch ((int)uniqueness) { case V1_SD_UNIQUENESS: return TYPE_STAT_DATA; case V1_INDIRECT_UNIQUENESS: return TYPE_INDIRECT; case V1_DIRECT_UNIQUENESS: return TYPE_DIRECT; @@ -1730,11 +1730,11 @@ int journal_release_error(struct reiserfs_transaction_handle*, struct super_bloc int journal_end(struct reiserfs_transaction_handle *, struct super_block *, unsigned long) ; int journal_end_sync(struct reiserfs_transaction_handle *, struct super_block *, unsigned long) ; int journal_mark_dirty_nolog(struct reiserfs_transaction_handle *, struct super_block *, struct buffer_head *bh) ; -int journal_mark_freed(struct reiserfs_transaction_handle *, struct super_block *, unsigned long blocknr) ; +int journal_mark_freed(struct reiserfs_transaction_handle *, struct super_block *, b_blocknr_t blocknr) ; int push_journal_writer(char *w) ; int pop_journal_writer(int windex) ; int journal_transaction_should_end(struct reiserfs_transaction_handle *, int) ; -int reiserfs_in_journal(struct super_block *p_s_sb, int bmap_nr, int bit_nr, int searchall, unsigned long *next) ; +int reiserfs_in_journal(struct super_block *p_s_sb, int bmap_nr, int bit_nr, int searchall, b_blocknr_t *next) ; int journal_begin(struct reiserfs_transaction_handle *, struct super_block *p_s_sb, unsigned long) ; void flush_async_commits(struct super_block *p_s_sb) ; @@ -2105,8 +2105,8 @@ struct buffer_head * get_FEB (struct tree_balance *); typedef struct __reiserfs_blocknr_hint reiserfs_blocknr_hint_t; int reiserfs_parse_alloc_options (struct super_block *, char *); -int is_reusable (struct super_block * s, unsigned long block, int bit_value); -void reiserfs_free_block (struct reiserfs_transaction_handle *th, unsigned long); +int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value); +void reiserfs_free_block (struct reiserfs_transaction_handle *th, b_blocknr_t); int reiserfs_allocate_blocknrs(reiserfs_blocknr_hint_t *, b_blocknr_t * , int, int); extern inline int reiserfs_new_form_blocknrs (struct tree_balance * tb, b_blocknr_t *new_blocknrs, int amount_needed) diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index f30f23b5c307..956b0d22d500 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h @@ -133,7 +133,7 @@ typedef enum { struct reiserfs_journal_cnode { struct buffer_head *bh ; /* real buffer head */ struct super_block *sb ; /* dev of real buffer head */ - unsigned long blocknr ; /* block number of real buffer head, == 0 when buffer on disk */ + __u32 blocknr ; /* block number of real buffer head, == 0 when buffer on disk */ long state ; struct reiserfs_journal_list *jlist ; /* journal list this cnode lives in */ struct reiserfs_journal_cnode *next ; /* next in transaction list */ |
