aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/recovery.c
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2006-10-11 04:20:59 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:15 -0400
commitf7f4bccb729844a0fa873e224e3a6f7eeed095bb (patch)
treeb5b8ce65b5c17b4a7d45e43a3530f2cc977fb894 /fs/jbd2/recovery.c
parent470decc613ab2048b619a01028072d932d9086ee (diff)
[PATCH] jbd2: rename jbd2 symbols to avoid duplication of jbd symbols
Mingming Cao originally did this work, and Shaggy reproduced it using some scripts from her. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/jbd2/recovery.c')
-rw-r--r--fs/jbd2/recovery.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 11563fe2a52b..b2012d112432 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -18,7 +18,7 @@
18#else 18#else
19#include <linux/time.h> 19#include <linux/time.h>
20#include <linux/fs.h> 20#include <linux/fs.h>
21#include <linux/jbd.h> 21#include <linux/jbd2.h>
22#include <linux/errno.h> 22#include <linux/errno.h>
23#include <linux/slab.h> 23#include <linux/slab.h>
24#endif 24#endif
@@ -86,7 +86,7 @@ static int do_readahead(journal_t *journal, unsigned int start)
86 nbufs = 0; 86 nbufs = 0;
87 87
88 for (next = start; next < max; next++) { 88 for (next = start; next < max; next++) {
89 err = journal_bmap(journal, next, &blocknr); 89 err = jbd2_journal_bmap(journal, next, &blocknr);
90 90
91 if (err) { 91 if (err) {
92 printk (KERN_ERR "JBD: bad block at offset %u\n", 92 printk (KERN_ERR "JBD: bad block at offset %u\n",
@@ -142,7 +142,7 @@ static int jread(struct buffer_head **bhp, journal_t *journal,
142 return -EIO; 142 return -EIO;
143 } 143 }
144 144
145 err = journal_bmap(journal, offset, &blocknr); 145 err = jbd2_journal_bmap(journal, offset, &blocknr);
146 146
147 if (err) { 147 if (err) {
148 printk (KERN_ERR "JBD: bad block at offset %u\n", 148 printk (KERN_ERR "JBD: bad block at offset %u\n",
@@ -191,10 +191,10 @@ static int count_tags(struct buffer_head *bh, int size)
191 191
192 nr++; 192 nr++;
193 tagp += sizeof(journal_block_tag_t); 193 tagp += sizeof(journal_block_tag_t);
194 if (!(tag->t_flags & cpu_to_be32(JFS_FLAG_SAME_UUID))) 194 if (!(tag->t_flags & cpu_to_be32(JBD2_FLAG_SAME_UUID)))
195 tagp += 16; 195 tagp += 16;
196 196
197 if (tag->t_flags & cpu_to_be32(JFS_FLAG_LAST_TAG)) 197 if (tag->t_flags & cpu_to_be32(JBD2_FLAG_LAST_TAG))
198 break; 198 break;
199 } 199 }
200 200
@@ -210,7 +210,7 @@ do { \
210} while (0) 210} while (0)
211 211
212/** 212/**
213 * journal_recover - recovers a on-disk journal 213 * jbd2_journal_recover - recovers a on-disk journal
214 * @journal: the journal to recover 214 * @journal: the journal to recover
215 * 215 *
216 * The primary function for recovering the log contents when mounting a 216 * The primary function for recovering the log contents when mounting a
@@ -221,7 +221,7 @@ do { \
221 * blocks. In the third and final pass, we replay any un-revoked blocks 221 * blocks. In the third and final pass, we replay any un-revoked blocks
222 * in the log. 222 * in the log.
223 */ 223 */
224int journal_recover(journal_t *journal) 224int jbd2_journal_recover(journal_t *journal)
225{ 225{
226 int err; 226 int err;
227 journal_superblock_t * sb; 227 journal_superblock_t * sb;
@@ -260,13 +260,13 @@ int journal_recover(journal_t *journal)
260 * any existing commit records in the log. */ 260 * any existing commit records in the log. */
261 journal->j_transaction_sequence = ++info.end_transaction; 261 journal->j_transaction_sequence = ++info.end_transaction;
262 262
263 journal_clear_revoke(journal); 263 jbd2_journal_clear_revoke(journal);
264 sync_blockdev(journal->j_fs_dev); 264 sync_blockdev(journal->j_fs_dev);
265 return err; 265 return err;
266} 266}
267 267
268/** 268/**
269 * journal_skip_recovery - Start journal and wipe exiting records 269 * jbd2_journal_skip_recovery - Start journal and wipe exiting records
270 * @journal: journal to startup 270 * @journal: journal to startup
271 * 271 *
272 * Locate any valid recovery information from the journal and set up the 272 * Locate any valid recovery information from the journal and set up the
@@ -278,7 +278,7 @@ int journal_recover(journal_t *journal)
278 * much recovery information is being erased, and to let us initialise 278 * much recovery information is being erased, and to let us initialise
279 * the journal transaction sequence numbers to the next unused ID. 279 * the journal transaction sequence numbers to the next unused ID.
280 */ 280 */
281int journal_skip_recovery(journal_t *journal) 281int jbd2_journal_skip_recovery(journal_t *journal)
282{ 282{
283 int err; 283 int err;
284 journal_superblock_t * sb; 284 journal_superblock_t * sb;
@@ -387,7 +387,7 @@ static int do_one_pass(journal_t *journal,
387 387
388 tmp = (journal_header_t *)bh->b_data; 388 tmp = (journal_header_t *)bh->b_data;
389 389
390 if (tmp->h_magic != cpu_to_be32(JFS_MAGIC_NUMBER)) { 390 if (tmp->h_magic != cpu_to_be32(JBD2_MAGIC_NUMBER)) {
391 brelse(bh); 391 brelse(bh);
392 break; 392 break;
393 } 393 }
@@ -407,7 +407,7 @@ static int do_one_pass(journal_t *journal,
407 * to do with it? That depends on the pass... */ 407 * to do with it? That depends on the pass... */
408 408
409 switch(blocktype) { 409 switch(blocktype) {
410 case JFS_DESCRIPTOR_BLOCK: 410 case JBD2_DESCRIPTOR_BLOCK:
411 /* If it is a valid descriptor block, replay it 411 /* If it is a valid descriptor block, replay it
412 * in pass REPLAY; otherwise, just skip over the 412 * in pass REPLAY; otherwise, just skip over the
413 * blocks it describes. */ 413 * blocks it describes. */
@@ -451,7 +451,7 @@ static int do_one_pass(journal_t *journal,
451 /* If the block has been 451 /* If the block has been
452 * revoked, then we're all done 452 * revoked, then we're all done
453 * here. */ 453 * here. */
454 if (journal_test_revoke 454 if (jbd2_journal_test_revoke
455 (journal, blocknr, 455 (journal, blocknr,
456 next_commit_ID)) { 456 next_commit_ID)) {
457 brelse(obh); 457 brelse(obh);
@@ -477,9 +477,9 @@ static int do_one_pass(journal_t *journal,
477 lock_buffer(nbh); 477 lock_buffer(nbh);
478 memcpy(nbh->b_data, obh->b_data, 478 memcpy(nbh->b_data, obh->b_data,
479 journal->j_blocksize); 479 journal->j_blocksize);
480 if (flags & JFS_FLAG_ESCAPE) { 480 if (flags & JBD2_FLAG_ESCAPE) {
481 *((__be32 *)bh->b_data) = 481 *((__be32 *)bh->b_data) =
482 cpu_to_be32(JFS_MAGIC_NUMBER); 482 cpu_to_be32(JBD2_MAGIC_NUMBER);
483 } 483 }
484 484
485 BUFFER_TRACE(nbh, "marking dirty"); 485 BUFFER_TRACE(nbh, "marking dirty");
@@ -495,17 +495,17 @@ static int do_one_pass(journal_t *journal,
495 495
496 skip_write: 496 skip_write:
497 tagp += sizeof(journal_block_tag_t); 497 tagp += sizeof(journal_block_tag_t);
498 if (!(flags & JFS_FLAG_SAME_UUID)) 498 if (!(flags & JBD2_FLAG_SAME_UUID))
499 tagp += 16; 499 tagp += 16;
500 500
501 if (flags & JFS_FLAG_LAST_TAG) 501 if (flags & JBD2_FLAG_LAST_TAG)
502 break; 502 break;
503 } 503 }
504 504
505 brelse(bh); 505 brelse(bh);
506 continue; 506 continue;
507 507
508 case JFS_COMMIT_BLOCK: 508 case JBD2_COMMIT_BLOCK:
509 /* Found an expected commit block: not much to 509 /* Found an expected commit block: not much to
510 * do other than move on to the next sequence 510 * do other than move on to the next sequence
511 * number. */ 511 * number. */
@@ -513,7 +513,7 @@ static int do_one_pass(journal_t *journal,
513 next_commit_ID++; 513 next_commit_ID++;
514 continue; 514 continue;
515 515
516 case JFS_REVOKE_BLOCK: 516 case JBD2_REVOKE_BLOCK:
517 /* If we aren't in the REVOKE pass, then we can 517 /* If we aren't in the REVOKE pass, then we can
518 * just skip over this block. */ 518 * just skip over this block. */
519 if (pass != PASS_REVOKE) { 519 if (pass != PASS_REVOKE) {
@@ -570,11 +570,11 @@ static int do_one_pass(journal_t *journal,
570static int scan_revoke_records(journal_t *journal, struct buffer_head *bh, 570static int scan_revoke_records(journal_t *journal, struct buffer_head *bh,
571 tid_t sequence, struct recovery_info *info) 571 tid_t sequence, struct recovery_info *info)
572{ 572{
573 journal_revoke_header_t *header; 573 jbd2_journal_revoke_header_t *header;
574 int offset, max; 574 int offset, max;
575 575
576 header = (journal_revoke_header_t *) bh->b_data; 576 header = (jbd2_journal_revoke_header_t *) bh->b_data;
577 offset = sizeof(journal_revoke_header_t); 577 offset = sizeof(jbd2_journal_revoke_header_t);
578 max = be32_to_cpu(header->r_count); 578 max = be32_to_cpu(header->r_count);
579 579
580 while (offset < max) { 580 while (offset < max) {
@@ -583,7 +583,7 @@ static int scan_revoke_records(journal_t *journal, struct buffer_head *bh,
583 583
584 blocknr = be32_to_cpu(* ((__be32 *) (bh->b_data+offset))); 584 blocknr = be32_to_cpu(* ((__be32 *) (bh->b_data+offset)));
585 offset += 4; 585 offset += 4;
586 err = journal_set_revoke(journal, blocknr, sequence); 586 err = jbd2_journal_set_revoke(journal, blocknr, sequence);
587 if (err) 587 if (err)
588 return err; 588 return err;
589 ++info->nr_revokes; 589 ++info->nr_revokes;