diff options
author | Jan Kara <jack@suse.cz> | 2009-08-03 13:21:00 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-09-16 11:44:10 -0400 |
commit | 9c28cbccec66a5ca292c6659bf5a0fe0c8459fa7 (patch) | |
tree | d43540ca30413ac8b3717e29f15ccbbe789a76c5 /fs/jbd/recovery.c | |
parent | 19003c18e9b41f5c3aeb81c92356f90958e1f22f (diff) |
jbd: Journal block numbers can ever be only 32-bit use unsigned int for them
It does not make sense to store block number for journal as unsigned long
since they can be only 32-bit (because of on-disk format limitation). So
change in-memory structures and variables to use unsigned int instead.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/jbd/recovery.c')
-rw-r--r-- | fs/jbd/recovery.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c index db5e982c5ddf..cb1a49ae605e 100644 --- a/fs/jbd/recovery.c +++ b/fs/jbd/recovery.c | |||
@@ -70,7 +70,7 @@ static int do_readahead(journal_t *journal, unsigned int start) | |||
70 | { | 70 | { |
71 | int err; | 71 | int err; |
72 | unsigned int max, nbufs, next; | 72 | unsigned int max, nbufs, next; |
73 | unsigned long blocknr; | 73 | unsigned int blocknr; |
74 | struct buffer_head *bh; | 74 | struct buffer_head *bh; |
75 | 75 | ||
76 | struct buffer_head * bufs[MAXBUF]; | 76 | struct buffer_head * bufs[MAXBUF]; |
@@ -132,7 +132,7 @@ static int jread(struct buffer_head **bhp, journal_t *journal, | |||
132 | unsigned int offset) | 132 | unsigned int offset) |
133 | { | 133 | { |
134 | int err; | 134 | int err; |
135 | unsigned long blocknr; | 135 | unsigned int blocknr; |
136 | struct buffer_head *bh; | 136 | struct buffer_head *bh; |
137 | 137 | ||
138 | *bhp = NULL; | 138 | *bhp = NULL; |
@@ -314,7 +314,7 @@ static int do_one_pass(journal_t *journal, | |||
314 | struct recovery_info *info, enum passtype pass) | 314 | struct recovery_info *info, enum passtype pass) |
315 | { | 315 | { |
316 | unsigned int first_commit_ID, next_commit_ID; | 316 | unsigned int first_commit_ID, next_commit_ID; |
317 | unsigned long next_log_block; | 317 | unsigned int next_log_block; |
318 | int err, success = 0; | 318 | int err, success = 0; |
319 | journal_superblock_t * sb; | 319 | journal_superblock_t * sb; |
320 | journal_header_t * tmp; | 320 | journal_header_t * tmp; |
@@ -367,14 +367,14 @@ static int do_one_pass(journal_t *journal, | |||
367 | if (tid_geq(next_commit_ID, info->end_transaction)) | 367 | if (tid_geq(next_commit_ID, info->end_transaction)) |
368 | break; | 368 | break; |
369 | 369 | ||
370 | jbd_debug(2, "Scanning for sequence ID %u at %lu/%lu\n", | 370 | jbd_debug(2, "Scanning for sequence ID %u at %u/%u\n", |
371 | next_commit_ID, next_log_block, journal->j_last); | 371 | next_commit_ID, next_log_block, journal->j_last); |
372 | 372 | ||
373 | /* Skip over each chunk of the transaction looking | 373 | /* Skip over each chunk of the transaction looking |
374 | * either the next descriptor block or the final commit | 374 | * either the next descriptor block or the final commit |
375 | * record. */ | 375 | * record. */ |
376 | 376 | ||
377 | jbd_debug(3, "JBD: checking block %ld\n", next_log_block); | 377 | jbd_debug(3, "JBD: checking block %u\n", next_log_block); |
378 | err = jread(&bh, journal, next_log_block); | 378 | err = jread(&bh, journal, next_log_block); |
379 | if (err) | 379 | if (err) |
380 | goto failed; | 380 | goto failed; |
@@ -429,7 +429,7 @@ static int do_one_pass(journal_t *journal, | |||
429 | tagp = &bh->b_data[sizeof(journal_header_t)]; | 429 | tagp = &bh->b_data[sizeof(journal_header_t)]; |
430 | while ((tagp - bh->b_data +sizeof(journal_block_tag_t)) | 430 | while ((tagp - bh->b_data +sizeof(journal_block_tag_t)) |
431 | <= journal->j_blocksize) { | 431 | <= journal->j_blocksize) { |
432 | unsigned long io_block; | 432 | unsigned int io_block; |
433 | 433 | ||
434 | tag = (journal_block_tag_t *) tagp; | 434 | tag = (journal_block_tag_t *) tagp; |
435 | flags = be32_to_cpu(tag->t_flags); | 435 | flags = be32_to_cpu(tag->t_flags); |
@@ -443,10 +443,10 @@ static int do_one_pass(journal_t *journal, | |||
443 | success = err; | 443 | success = err; |
444 | printk (KERN_ERR | 444 | printk (KERN_ERR |
445 | "JBD: IO error %d recovering " | 445 | "JBD: IO error %d recovering " |
446 | "block %ld in log\n", | 446 | "block %u in log\n", |
447 | err, io_block); | 447 | err, io_block); |
448 | } else { | 448 | } else { |
449 | unsigned long blocknr; | 449 | unsigned int blocknr; |
450 | 450 | ||
451 | J_ASSERT(obh != NULL); | 451 | J_ASSERT(obh != NULL); |
452 | blocknr = be32_to_cpu(tag->t_blocknr); | 452 | blocknr = be32_to_cpu(tag->t_blocknr); |
@@ -581,7 +581,7 @@ static int scan_revoke_records(journal_t *journal, struct buffer_head *bh, | |||
581 | max = be32_to_cpu(header->r_count); | 581 | max = be32_to_cpu(header->r_count); |
582 | 582 | ||
583 | while (offset < max) { | 583 | while (offset < max) { |
584 | unsigned long blocknr; | 584 | unsigned int blocknr; |
585 | int err; | 585 | int err; |
586 | 586 | ||
587 | blocknr = be32_to_cpu(* ((__be32 *) (bh->b_data+offset))); | 587 | blocknr = be32_to_cpu(* ((__be32 *) (bh->b_data+offset))); |