aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2009-03-30 14:02:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 15:16:35 -0400
commit600ed41675d8c384519d8f0b3c76afed39ef2f4b (patch)
tree106f17dcaaee07671efdef651ff7f78b1afffb2f /include/linux
parent702d21c6f6c790b12c4820cd2f29bc8472aed633 (diff)
reiserfs: audit transaction ids to always be unsigned ints
This patch fixes up the reiserfs code such that transaction ids are always unsigned ints. In places they can currently be signed ints or unsigned longs. The former just causes an annoying clm-2200 warning and may join a transaction when it should wait. The latter is just for correctness since the disk format uses a 32-bit transaction id. There aren't any runtime problems that result from it not wrapping at the correct location since the value is truncated correctly even on big endian systems. The 0 value might make it to disk, but the mount-time checks will bump it to 10 itself. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/reiserfs_fs.h2
-rw-r--r--include/linux/reiserfs_fs_i.h2
-rw-r--r--include/linux/reiserfs_fs_sb.h8
3 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index ab748a03fe97..bd52b949f8c9 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1676,7 +1676,7 @@ struct reiserfs_transaction_handle {
1676 int t_refcount; 1676 int t_refcount;
1677 int t_blocks_logged; /* number of blocks this writer has logged */ 1677 int t_blocks_logged; /* number of blocks this writer has logged */
1678 int t_blocks_allocated; /* number of blocks this writer allocated */ 1678 int t_blocks_allocated; /* number of blocks this writer allocated */
1679 unsigned long t_trans_id; /* sanity check, equals the current trans id */ 1679 unsigned int t_trans_id; /* sanity check, equals the current trans id */
1680 void *t_handle_save; /* save existing current->journal_info */ 1680 void *t_handle_save; /* save existing current->journal_info */
1681 unsigned displace_new_blocks:1; /* if new block allocation occurres, that block 1681 unsigned displace_new_blocks:1; /* if new block allocation occurres, that block
1682 should be displaced from others */ 1682 should be displaced from others */
diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h
index ce3663fb0101..201dd910b042 100644
--- a/include/linux/reiserfs_fs_i.h
+++ b/include/linux/reiserfs_fs_i.h
@@ -51,7 +51,7 @@ struct reiserfs_inode_info {
51 /* we use these for fsync or O_SYNC to decide which transaction 51 /* we use these for fsync or O_SYNC to decide which transaction
52 ** needs to be committed in order for this inode to be properly 52 ** needs to be committed in order for this inode to be properly
53 ** flushed */ 53 ** flushed */
54 unsigned long i_trans_id; 54 unsigned int i_trans_id;
55 struct reiserfs_journal_list *i_jl; 55 struct reiserfs_journal_list *i_jl;
56 struct mutex i_mmap; 56 struct mutex i_mmap;
57#ifdef CONFIG_REISERFS_FS_POSIX_ACL 57#ifdef CONFIG_REISERFS_FS_POSIX_ACL
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index ccd38f351530..12fc2a0d13be 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -156,7 +156,7 @@ struct reiserfs_journal_list {
156 atomic_t j_commit_left; 156 atomic_t j_commit_left;
157 atomic_t j_older_commits_done; /* all commits older than this on disk */ 157 atomic_t j_older_commits_done; /* all commits older than this on disk */
158 struct mutex j_commit_mutex; 158 struct mutex j_commit_mutex;
159 unsigned long j_trans_id; 159 unsigned int j_trans_id;
160 time_t j_timestamp; 160 time_t j_timestamp;
161 struct reiserfs_list_bitmap *j_list_bitmap; 161 struct reiserfs_list_bitmap *j_list_bitmap;
162 struct buffer_head *j_commit_bh; /* commit buffer head */ 162 struct buffer_head *j_commit_bh; /* commit buffer head */
@@ -185,7 +185,7 @@ struct reiserfs_journal {
185 int j_1st_reserved_block; /* first block on s_dev of reserved area journal */ 185 int j_1st_reserved_block; /* first block on s_dev of reserved area journal */
186 186
187 unsigned long j_state; 187 unsigned long j_state;
188 unsigned long j_trans_id; 188 unsigned int j_trans_id;
189 unsigned long j_mount_id; 189 unsigned long j_mount_id;
190 unsigned long j_start; /* start of current waiting commit (index into j_ap_blocks) */ 190 unsigned long j_start; /* start of current waiting commit (index into j_ap_blocks) */
191 unsigned long j_len; /* length of current waiting commit */ 191 unsigned long j_len; /* length of current waiting commit */
@@ -226,10 +226,10 @@ struct reiserfs_journal {
226 int j_num_work_lists; /* number that need attention from kreiserfsd */ 226 int j_num_work_lists; /* number that need attention from kreiserfsd */
227 227
228 /* debugging to make sure things are flushed in order */ 228 /* debugging to make sure things are flushed in order */
229 int j_last_flush_id; 229 unsigned int j_last_flush_id;
230 230
231 /* debugging to make sure things are committed in order */ 231 /* debugging to make sure things are committed in order */
232 int j_last_commit_id; 232 unsigned int j_last_commit_id;
233 233
234 struct list_head j_bitmap_nodes; 234 struct list_head j_bitmap_nodes;
235 struct list_head j_dirty_buffers; 235 struct list_head j_dirty_buffers;