diff options
| author | Eryu Guan <guaneryu@gmail.com> | 2011-11-01 19:09:18 -0400 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2011-11-01 19:09:18 -0400 |
| commit | f2a44523b20f323e4aef7c16261d34d6f0a4bf06 (patch) | |
| tree | b7b46aefb3c91ab9f5462bd990ba02523c60ba96 | |
| parent | 8762202dd0d6e46854f786bdb6fb3780a1625efe (diff) | |
jbd2: Unify log messages in jbd2 code
Some jbd2 code prints out kernel messages with "JBD2: " prefix, at the
same time other jbd2 code prints with "JBD: " prefix. Unify the prefix
to "JBD2: ".
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| -rw-r--r-- | fs/jbd2/commit.c | 26 | ||||
| -rw-r--r-- | fs/jbd2/journal.c | 36 | ||||
| -rw-r--r-- | fs/jbd2/recovery.c | 28 | ||||
| -rw-r--r-- | fs/jbd2/transaction.c | 4 |
4 files changed, 47 insertions, 47 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index eef6979821a4..68d704db787f 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
| @@ -352,7 +352,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 352 | J_ASSERT(commit_transaction->t_state == T_RUNNING); | 352 | J_ASSERT(commit_transaction->t_state == T_RUNNING); |
| 353 | 353 | ||
| 354 | trace_jbd2_start_commit(journal, commit_transaction); | 354 | trace_jbd2_start_commit(journal, commit_transaction); |
| 355 | jbd_debug(1, "JBD: starting commit of transaction %d\n", | 355 | jbd_debug(1, "JBD2: starting commit of transaction %d\n", |
| 356 | commit_transaction->t_tid); | 356 | commit_transaction->t_tid); |
| 357 | 357 | ||
| 358 | write_lock(&journal->j_state_lock); | 358 | write_lock(&journal->j_state_lock); |
| @@ -427,7 +427,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 427 | __jbd2_journal_clean_checkpoint_list(journal); | 427 | __jbd2_journal_clean_checkpoint_list(journal); |
| 428 | spin_unlock(&journal->j_list_lock); | 428 | spin_unlock(&journal->j_list_lock); |
| 429 | 429 | ||
| 430 | jbd_debug (3, "JBD: commit phase 1\n"); | 430 | jbd_debug(3, "JBD2: commit phase 1\n"); |
| 431 | 431 | ||
| 432 | /* | 432 | /* |
| 433 | * Switch to a new revoke table. | 433 | * Switch to a new revoke table. |
| @@ -447,7 +447,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 447 | wake_up(&journal->j_wait_transaction_locked); | 447 | wake_up(&journal->j_wait_transaction_locked); |
| 448 | write_unlock(&journal->j_state_lock); | 448 | write_unlock(&journal->j_state_lock); |
| 449 | 449 | ||
| 450 | jbd_debug (3, "JBD: commit phase 2\n"); | 450 | jbd_debug(3, "JBD2: commit phase 2\n"); |
| 451 | 451 | ||
| 452 | /* | 452 | /* |
| 453 | * Now start flushing things to disk, in the order they appear | 453 | * Now start flushing things to disk, in the order they appear |
| @@ -462,7 +462,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 462 | WRITE_SYNC); | 462 | WRITE_SYNC); |
| 463 | blk_finish_plug(&plug); | 463 | blk_finish_plug(&plug); |
| 464 | 464 | ||
| 465 | jbd_debug(3, "JBD: commit phase 2\n"); | 465 | jbd_debug(3, "JBD2: commit phase 2\n"); |
| 466 | 466 | ||
| 467 | /* | 467 | /* |
| 468 | * Way to go: we have now written out all of the data for a | 468 | * Way to go: we have now written out all of the data for a |
| @@ -522,7 +522,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 522 | 522 | ||
| 523 | J_ASSERT (bufs == 0); | 523 | J_ASSERT (bufs == 0); |
| 524 | 524 | ||
| 525 | jbd_debug(4, "JBD: get descriptor\n"); | 525 | jbd_debug(4, "JBD2: get descriptor\n"); |
| 526 | 526 | ||
| 527 | descriptor = jbd2_journal_get_descriptor_buffer(journal); | 527 | descriptor = jbd2_journal_get_descriptor_buffer(journal); |
| 528 | if (!descriptor) { | 528 | if (!descriptor) { |
| @@ -531,7 +531,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | bh = jh2bh(descriptor); | 533 | bh = jh2bh(descriptor); |
| 534 | jbd_debug(4, "JBD: got buffer %llu (%p)\n", | 534 | jbd_debug(4, "JBD2: got buffer %llu (%p)\n", |
| 535 | (unsigned long long)bh->b_blocknr, bh->b_data); | 535 | (unsigned long long)bh->b_blocknr, bh->b_data); |
| 536 | header = (journal_header_t *)&bh->b_data[0]; | 536 | header = (journal_header_t *)&bh->b_data[0]; |
| 537 | header->h_magic = cpu_to_be32(JBD2_MAGIC_NUMBER); | 537 | header->h_magic = cpu_to_be32(JBD2_MAGIC_NUMBER); |
| @@ -625,7 +625,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 625 | commit_transaction->t_buffers == NULL || | 625 | commit_transaction->t_buffers == NULL || |
| 626 | space_left < tag_bytes + 16) { | 626 | space_left < tag_bytes + 16) { |
| 627 | 627 | ||
| 628 | jbd_debug(4, "JBD: Submit %d IOs\n", bufs); | 628 | jbd_debug(4, "JBD2: Submit %d IOs\n", bufs); |
| 629 | 629 | ||
| 630 | /* Write an end-of-descriptor marker before | 630 | /* Write an end-of-descriptor marker before |
| 631 | submitting the IOs. "tag" still points to | 631 | submitting the IOs. "tag" still points to |
| @@ -707,7 +707,7 @@ start_journal_io: | |||
| 707 | so we incur less scheduling load. | 707 | so we incur less scheduling load. |
| 708 | */ | 708 | */ |
| 709 | 709 | ||
| 710 | jbd_debug(3, "JBD: commit phase 3\n"); | 710 | jbd_debug(3, "JBD2: commit phase 3\n"); |
| 711 | 711 | ||
| 712 | /* | 712 | /* |
| 713 | * akpm: these are BJ_IO, and j_list_lock is not needed. | 713 | * akpm: these are BJ_IO, and j_list_lock is not needed. |
| @@ -771,7 +771,7 @@ wait_for_iobuf: | |||
| 771 | 771 | ||
| 772 | J_ASSERT (commit_transaction->t_shadow_list == NULL); | 772 | J_ASSERT (commit_transaction->t_shadow_list == NULL); |
| 773 | 773 | ||
| 774 | jbd_debug(3, "JBD: commit phase 4\n"); | 774 | jbd_debug(3, "JBD2: commit phase 4\n"); |
| 775 | 775 | ||
| 776 | /* Here we wait for the revoke record and descriptor record buffers */ | 776 | /* Here we wait for the revoke record and descriptor record buffers */ |
| 777 | wait_for_ctlbuf: | 777 | wait_for_ctlbuf: |
| @@ -801,7 +801,7 @@ wait_for_iobuf: | |||
| 801 | if (err) | 801 | if (err) |
| 802 | jbd2_journal_abort(journal, err); | 802 | jbd2_journal_abort(journal, err); |
| 803 | 803 | ||
| 804 | jbd_debug(3, "JBD: commit phase 5\n"); | 804 | jbd_debug(3, "JBD2: commit phase 5\n"); |
| 805 | write_lock(&journal->j_state_lock); | 805 | write_lock(&journal->j_state_lock); |
| 806 | J_ASSERT(commit_transaction->t_state == T_COMMIT_DFLUSH); | 806 | J_ASSERT(commit_transaction->t_state == T_COMMIT_DFLUSH); |
| 807 | commit_transaction->t_state = T_COMMIT_JFLUSH; | 807 | commit_transaction->t_state = T_COMMIT_JFLUSH; |
| @@ -830,7 +830,7 @@ wait_for_iobuf: | |||
| 830 | transaction can be removed from any checkpoint list it was on | 830 | transaction can be removed from any checkpoint list it was on |
| 831 | before. */ | 831 | before. */ |
| 832 | 832 | ||
| 833 | jbd_debug(3, "JBD: commit phase 6\n"); | 833 | jbd_debug(3, "JBD2: commit phase 6\n"); |
| 834 | 834 | ||
| 835 | J_ASSERT(list_empty(&commit_transaction->t_inode_list)); | 835 | J_ASSERT(list_empty(&commit_transaction->t_inode_list)); |
| 836 | J_ASSERT(commit_transaction->t_buffers == NULL); | 836 | J_ASSERT(commit_transaction->t_buffers == NULL); |
| @@ -964,7 +964,7 @@ restart_loop: | |||
| 964 | 964 | ||
| 965 | /* Done with this transaction! */ | 965 | /* Done with this transaction! */ |
| 966 | 966 | ||
| 967 | jbd_debug(3, "JBD: commit phase 7\n"); | 967 | jbd_debug(3, "JBD2: commit phase 7\n"); |
| 968 | 968 | ||
| 969 | J_ASSERT(commit_transaction->t_state == T_COMMIT_JFLUSH); | 969 | J_ASSERT(commit_transaction->t_state == T_COMMIT_JFLUSH); |
| 970 | 970 | ||
| @@ -1039,7 +1039,7 @@ restart_loop: | |||
| 1039 | journal->j_commit_callback(journal, commit_transaction); | 1039 | journal->j_commit_callback(journal, commit_transaction); |
| 1040 | 1040 | ||
| 1041 | trace_jbd2_end_commit(journal, commit_transaction); | 1041 | trace_jbd2_end_commit(journal, commit_transaction); |
| 1042 | jbd_debug(1, "JBD: commit %d complete, head %d\n", | 1042 | jbd_debug(1, "JBD2: commit %d complete, head %d\n", |
| 1043 | journal->j_commit_sequence, journal->j_tail_sequence); | 1043 | journal->j_commit_sequence, journal->j_tail_sequence); |
| 1044 | if (to_free) | 1044 | if (to_free) |
| 1045 | kfree(commit_transaction); | 1045 | kfree(commit_transaction); |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index d6e93d00833e..0fa0123151d3 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
| @@ -491,7 +491,7 @@ int __jbd2_log_start_commit(journal_t *journal, tid_t target) | |||
| 491 | */ | 491 | */ |
| 492 | 492 | ||
| 493 | journal->j_commit_request = target; | 493 | journal->j_commit_request = target; |
| 494 | jbd_debug(1, "JBD: requesting commit %d/%d\n", | 494 | jbd_debug(1, "JBD2: requesting commit %d/%d\n", |
| 495 | journal->j_commit_request, | 495 | journal->j_commit_request, |
| 496 | journal->j_commit_sequence); | 496 | journal->j_commit_sequence); |
| 497 | wake_up(&journal->j_wait_commit); | 497 | wake_up(&journal->j_wait_commit); |
| @@ -500,7 +500,7 @@ int __jbd2_log_start_commit(journal_t *journal, tid_t target) | |||
| 500 | /* This should never happen, but if it does, preserve | 500 | /* This should never happen, but if it does, preserve |
| 501 | the evidence before kjournald goes into a loop and | 501 | the evidence before kjournald goes into a loop and |
| 502 | increments j_commit_sequence beyond all recognition. */ | 502 | increments j_commit_sequence beyond all recognition. */ |
| 503 | WARN_ONCE(1, "jbd: bad log_start_commit: %u %u %u %u\n", | 503 | WARN_ONCE(1, "JBD2: bad log_start_commit: %u %u %u %u\n", |
| 504 | journal->j_commit_request, | 504 | journal->j_commit_request, |
| 505 | journal->j_commit_sequence, | 505 | journal->j_commit_sequence, |
| 506 | target, journal->j_running_transaction ? | 506 | target, journal->j_running_transaction ? |
| @@ -645,7 +645,7 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid) | |||
| 645 | } | 645 | } |
| 646 | #endif | 646 | #endif |
| 647 | while (tid_gt(tid, journal->j_commit_sequence)) { | 647 | while (tid_gt(tid, journal->j_commit_sequence)) { |
| 648 | jbd_debug(1, "JBD: want %d, j_commit_sequence=%d\n", | 648 | jbd_debug(1, "JBD2: want %d, j_commit_sequence=%d\n", |
| 649 | tid, journal->j_commit_sequence); | 649 | tid, journal->j_commit_sequence); |
| 650 | wake_up(&journal->j_wait_commit); | 650 | wake_up(&journal->j_wait_commit); |
| 651 | read_unlock(&journal->j_state_lock); | 651 | read_unlock(&journal->j_state_lock); |
| @@ -1093,7 +1093,7 @@ static int journal_reset(journal_t *journal) | |||
| 1093 | first = be32_to_cpu(sb->s_first); | 1093 | first = be32_to_cpu(sb->s_first); |
| 1094 | last = be32_to_cpu(sb->s_maxlen); | 1094 | last = be32_to_cpu(sb->s_maxlen); |
| 1095 | if (first + JBD2_MIN_JOURNAL_BLOCKS > last + 1) { | 1095 | if (first + JBD2_MIN_JOURNAL_BLOCKS > last + 1) { |
| 1096 | printk(KERN_ERR "JBD: Journal too short (blocks %llu-%llu).\n", | 1096 | printk(KERN_ERR "JBD2: Journal too short (blocks %llu-%llu).\n", |
| 1097 | first, last); | 1097 | first, last); |
| 1098 | journal_fail_superblock(journal); | 1098 | journal_fail_superblock(journal); |
| 1099 | return -EINVAL; | 1099 | return -EINVAL; |
| @@ -1139,7 +1139,7 @@ void jbd2_journal_update_superblock(journal_t *journal, int wait) | |||
| 1139 | */ | 1139 | */ |
| 1140 | if (sb->s_start == 0 && journal->j_tail_sequence == | 1140 | if (sb->s_start == 0 && journal->j_tail_sequence == |
| 1141 | journal->j_transaction_sequence) { | 1141 | journal->j_transaction_sequence) { |
| 1142 | jbd_debug(1,"JBD: Skipping superblock update on recovered sb " | 1142 | jbd_debug(1, "JBD2: Skipping superblock update on recovered sb " |
| 1143 | "(start %ld, seq %d, errno %d)\n", | 1143 | "(start %ld, seq %d, errno %d)\n", |
| 1144 | journal->j_tail, journal->j_tail_sequence, | 1144 | journal->j_tail, journal->j_tail_sequence, |
| 1145 | journal->j_errno); | 1145 | journal->j_errno); |
| @@ -1163,7 +1163,7 @@ void jbd2_journal_update_superblock(journal_t *journal, int wait) | |||
| 1163 | } | 1163 | } |
| 1164 | 1164 | ||
| 1165 | read_lock(&journal->j_state_lock); | 1165 | read_lock(&journal->j_state_lock); |
| 1166 | jbd_debug(1,"JBD: updating superblock (start %ld, seq %d, errno %d)\n", | 1166 | jbd_debug(1, "JBD2: updating superblock (start %ld, seq %d, errno %d)\n", |
| 1167 | journal->j_tail, journal->j_tail_sequence, journal->j_errno); | 1167 | journal->j_tail, journal->j_tail_sequence, journal->j_errno); |
| 1168 | 1168 | ||
| 1169 | sb->s_sequence = cpu_to_be32(journal->j_tail_sequence); | 1169 | sb->s_sequence = cpu_to_be32(journal->j_tail_sequence); |
| @@ -1216,8 +1216,8 @@ static int journal_get_superblock(journal_t *journal) | |||
| 1216 | ll_rw_block(READ, 1, &bh); | 1216 | ll_rw_block(READ, 1, &bh); |
| 1217 | wait_on_buffer(bh); | 1217 | wait_on_buffer(bh); |
| 1218 | if (!buffer_uptodate(bh)) { | 1218 | if (!buffer_uptodate(bh)) { |
| 1219 | printk (KERN_ERR | 1219 | printk(KERN_ERR |
| 1220 | "JBD: IO error reading journal superblock\n"); | 1220 | "JBD2: IO error reading journal superblock\n"); |
| 1221 | goto out; | 1221 | goto out; |
| 1222 | } | 1222 | } |
| 1223 | } | 1223 | } |
| @@ -1228,7 +1228,7 @@ static int journal_get_superblock(journal_t *journal) | |||
| 1228 | 1228 | ||
| 1229 | if (sb->s_header.h_magic != cpu_to_be32(JBD2_MAGIC_NUMBER) || | 1229 | if (sb->s_header.h_magic != cpu_to_be32(JBD2_MAGIC_NUMBER) || |
| 1230 | sb->s_blocksize != cpu_to_be32(journal->j_blocksize)) { | 1230 | sb->s_blocksize != cpu_to_be32(journal->j_blocksize)) { |
| 1231 | printk(KERN_WARNING "JBD: no valid journal superblock found\n"); | 1231 | printk(KERN_WARNING "JBD2: no valid journal superblock found\n"); |
| 1232 | goto out; | 1232 | goto out; |
| 1233 | } | 1233 | } |
| 1234 | 1234 | ||
| @@ -1240,14 +1240,14 @@ static int journal_get_superblock(journal_t *journal) | |||
| 1240 | journal->j_format_version = 2; | 1240 | journal->j_format_version = 2; |
| 1241 | break; | 1241 | break; |
| 1242 | default: | 1242 | default: |
| 1243 | printk(KERN_WARNING "JBD: unrecognised superblock format ID\n"); | 1243 | printk(KERN_WARNING "JBD2: unrecognised superblock format ID\n"); |
| 1244 | goto out; | 1244 | goto out; |
| 1245 | } | 1245 | } |
| 1246 | 1246 | ||
| 1247 | if (be32_to_cpu(sb->s_maxlen) < journal->j_maxlen) | 1247 | if (be32_to_cpu(sb->s_maxlen) < journal->j_maxlen) |
| 1248 | journal->j_maxlen = be32_to_cpu(sb->s_maxlen); | 1248 | journal->j_maxlen = be32_to_cpu(sb->s_maxlen); |
| 1249 | else if (be32_to_cpu(sb->s_maxlen) > journal->j_maxlen) { | 1249 | else if (be32_to_cpu(sb->s_maxlen) > journal->j_maxlen) { |
| 1250 | printk (KERN_WARNING "JBD: journal file too short\n"); | 1250 | printk(KERN_WARNING "JBD2: journal file too short\n"); |
| 1251 | goto out; | 1251 | goto out; |
| 1252 | } | 1252 | } |
| 1253 | 1253 | ||
| @@ -1318,8 +1318,8 @@ int jbd2_journal_load(journal_t *journal) | |||
| 1318 | ~cpu_to_be32(JBD2_KNOWN_ROCOMPAT_FEATURES)) || | 1318 | ~cpu_to_be32(JBD2_KNOWN_ROCOMPAT_FEATURES)) || |
| 1319 | (sb->s_feature_incompat & | 1319 | (sb->s_feature_incompat & |
| 1320 | ~cpu_to_be32(JBD2_KNOWN_INCOMPAT_FEATURES))) { | 1320 | ~cpu_to_be32(JBD2_KNOWN_INCOMPAT_FEATURES))) { |
| 1321 | printk (KERN_WARNING | 1321 | printk(KERN_WARNING |
| 1322 | "JBD: Unrecognised features on journal\n"); | 1322 | "JBD2: Unrecognised features on journal\n"); |
| 1323 | return -EINVAL; | 1323 | return -EINVAL; |
| 1324 | } | 1324 | } |
| 1325 | } | 1325 | } |
| @@ -1354,7 +1354,7 @@ int jbd2_journal_load(journal_t *journal) | |||
| 1354 | return 0; | 1354 | return 0; |
| 1355 | 1355 | ||
| 1356 | recovery_error: | 1356 | recovery_error: |
| 1357 | printk (KERN_WARNING "JBD: recovery failed\n"); | 1357 | printk(KERN_WARNING "JBD2: recovery failed\n"); |
| 1358 | return -EIO; | 1358 | return -EIO; |
| 1359 | } | 1359 | } |
| 1360 | 1360 | ||
| @@ -1585,7 +1585,7 @@ static int journal_convert_superblock_v1(journal_t *journal, | |||
| 1585 | struct buffer_head *bh; | 1585 | struct buffer_head *bh; |
| 1586 | 1586 | ||
| 1587 | printk(KERN_WARNING | 1587 | printk(KERN_WARNING |
| 1588 | "JBD: Converting superblock from version 1 to 2.\n"); | 1588 | "JBD2: Converting superblock from version 1 to 2.\n"); |
| 1589 | 1589 | ||
| 1590 | /* Pre-initialise new fields to zero */ | 1590 | /* Pre-initialise new fields to zero */ |
| 1591 | offset = ((char *) &(sb->s_feature_compat)) - ((char *) sb); | 1591 | offset = ((char *) &(sb->s_feature_compat)) - ((char *) sb); |
| @@ -1702,7 +1702,7 @@ int jbd2_journal_wipe(journal_t *journal, int write) | |||
| 1702 | if (!journal->j_tail) | 1702 | if (!journal->j_tail) |
| 1703 | goto no_recovery; | 1703 | goto no_recovery; |
| 1704 | 1704 | ||
| 1705 | printk (KERN_WARNING "JBD: %s recovery information on journal\n", | 1705 | printk(KERN_WARNING "JBD2: %s recovery information on journal\n", |
| 1706 | write ? "Clearing" : "Ignoring"); | 1706 | write ? "Clearing" : "Ignoring"); |
| 1707 | 1707 | ||
| 1708 | err = jbd2_journal_skip_recovery(journal); | 1708 | err = jbd2_journal_skip_recovery(journal); |
| @@ -2028,7 +2028,7 @@ static int journal_init_jbd2_journal_head_cache(void) | |||
| 2028 | retval = 0; | 2028 | retval = 0; |
| 2029 | if (!jbd2_journal_head_cache) { | 2029 | if (!jbd2_journal_head_cache) { |
| 2030 | retval = -ENOMEM; | 2030 | retval = -ENOMEM; |
| 2031 | printk(KERN_EMERG "JBD: no memory for journal_head cache\n"); | 2031 | printk(KERN_EMERG "JBD2: no memory for journal_head cache\n"); |
| 2032 | } | 2032 | } |
| 2033 | return retval; | 2033 | return retval; |
| 2034 | } | 2034 | } |
| @@ -2391,7 +2391,7 @@ static void __exit journal_exit(void) | |||
| 2391 | #ifdef CONFIG_JBD2_DEBUG | 2391 | #ifdef CONFIG_JBD2_DEBUG |
| 2392 | int n = atomic_read(&nr_journal_heads); | 2392 | int n = atomic_read(&nr_journal_heads); |
| 2393 | if (n) | 2393 | if (n) |
| 2394 | printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n); | 2394 | printk(KERN_EMERG "JBD2: leaked %d journal_heads!\n", n); |
| 2395 | #endif | 2395 | #endif |
| 2396 | jbd2_remove_debugfs_entry(); | 2396 | jbd2_remove_debugfs_entry(); |
| 2397 | jbd2_remove_jbd_stats_proc_entry(); | 2397 | jbd2_remove_jbd_stats_proc_entry(); |
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index 1cad869494f0..da6d7baf1390 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c | |||
| @@ -89,7 +89,7 @@ static int do_readahead(journal_t *journal, unsigned int start) | |||
| 89 | err = jbd2_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 "JBD2: bad block at offset %u\n", |
| 93 | next); | 93 | next); |
| 94 | goto failed; | 94 | goto failed; |
| 95 | } | 95 | } |
| @@ -138,14 +138,14 @@ static int jread(struct buffer_head **bhp, journal_t *journal, | |||
| 138 | *bhp = NULL; | 138 | *bhp = NULL; |
| 139 | 139 | ||
| 140 | if (offset >= journal->j_maxlen) { | 140 | if (offset >= journal->j_maxlen) { |
| 141 | printk(KERN_ERR "JBD: corrupted journal superblock\n"); | 141 | printk(KERN_ERR "JBD2: corrupted journal superblock\n"); |
| 142 | return -EIO; | 142 | return -EIO; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | err = jbd2_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 "JBD2: bad block at offset %u\n", |
| 149 | offset); | 149 | offset); |
| 150 | return err; | 150 | return err; |
| 151 | } | 151 | } |
| @@ -163,7 +163,7 @@ static int jread(struct buffer_head **bhp, journal_t *journal, | |||
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | if (!buffer_uptodate(bh)) { | 165 | if (!buffer_uptodate(bh)) { |
| 166 | printk (KERN_ERR "JBD: Failed to read block at offset %u\n", | 166 | printk(KERN_ERR "JBD2: Failed to read block at offset %u\n", |
| 167 | offset); | 167 | offset); |
| 168 | brelse(bh); | 168 | brelse(bh); |
| 169 | return -EIO; | 169 | return -EIO; |
| @@ -251,10 +251,10 @@ int jbd2_journal_recover(journal_t *journal) | |||
| 251 | if (!err) | 251 | if (!err) |
| 252 | err = do_one_pass(journal, &info, PASS_REPLAY); | 252 | err = do_one_pass(journal, &info, PASS_REPLAY); |
| 253 | 253 | ||
| 254 | jbd_debug(1, "JBD: recovery, exit status %d, " | 254 | jbd_debug(1, "JBD2: recovery, exit status %d, " |
| 255 | "recovered transactions %u to %u\n", | 255 | "recovered transactions %u to %u\n", |
| 256 | err, info.start_transaction, info.end_transaction); | 256 | err, info.start_transaction, info.end_transaction); |
| 257 | jbd_debug(1, "JBD: Replayed %d and revoked %d/%d blocks\n", | 257 | jbd_debug(1, "JBD2: Replayed %d and revoked %d/%d blocks\n", |
| 258 | info.nr_replays, info.nr_revoke_hits, info.nr_revokes); | 258 | info.nr_replays, info.nr_revoke_hits, info.nr_revokes); |
| 259 | 259 | ||
| 260 | /* Restart the log at the next transaction ID, thus invalidating | 260 | /* Restart the log at the next transaction ID, thus invalidating |
| @@ -293,14 +293,14 @@ int jbd2_journal_skip_recovery(journal_t *journal) | |||
| 293 | err = do_one_pass(journal, &info, PASS_SCAN); | 293 | err = do_one_pass(journal, &info, PASS_SCAN); |
| 294 | 294 | ||
| 295 | if (err) { | 295 | if (err) { |
| 296 | printk(KERN_ERR "JBD: error %d scanning journal\n", err); | 296 | printk(KERN_ERR "JBD2: error %d scanning journal\n", err); |
| 297 | ++journal->j_transaction_sequence; | 297 | ++journal->j_transaction_sequence; |
| 298 | } else { | 298 | } else { |
| 299 | #ifdef CONFIG_JBD2_DEBUG | 299 | #ifdef CONFIG_JBD2_DEBUG |
| 300 | int dropped = info.end_transaction - | 300 | int dropped = info.end_transaction - |
| 301 | be32_to_cpu(journal->j_superblock->s_sequence); | 301 | be32_to_cpu(journal->j_superblock->s_sequence); |
| 302 | jbd_debug(1, | 302 | jbd_debug(1, |
| 303 | "JBD: ignoring %d transaction%s from the journal.\n", | 303 | "JBD2: ignoring %d transaction%s from the journal.\n", |
| 304 | dropped, (dropped == 1) ? "" : "s"); | 304 | dropped, (dropped == 1) ? "" : "s"); |
| 305 | #endif | 305 | #endif |
| 306 | journal->j_transaction_sequence = ++info.end_transaction; | 306 | journal->j_transaction_sequence = ++info.end_transaction; |
| @@ -338,7 +338,7 @@ static int calc_chksums(journal_t *journal, struct buffer_head *bh, | |||
| 338 | wrap(journal, *next_log_block); | 338 | wrap(journal, *next_log_block); |
| 339 | err = jread(&obh, journal, io_block); | 339 | err = jread(&obh, journal, io_block); |
| 340 | if (err) { | 340 | if (err) { |
| 341 | printk(KERN_ERR "JBD: IO error %d recovering block " | 341 | printk(KERN_ERR "JBD2: IO error %d recovering block " |
| 342 | "%lu in log\n", err, io_block); | 342 | "%lu in log\n", err, io_block); |
| 343 | return 1; | 343 | return 1; |
| 344 | } else { | 344 | } else { |
| @@ -411,7 +411,7 @@ static int do_one_pass(journal_t *journal, | |||
| 411 | * either the next descriptor block or the final commit | 411 | * either the next descriptor block or the final commit |
| 412 | * record. */ | 412 | * record. */ |
| 413 | 413 | ||
| 414 | jbd_debug(3, "JBD: checking block %ld\n", next_log_block); | 414 | jbd_debug(3, "JBD2: checking block %ld\n", next_log_block); |
| 415 | err = jread(&bh, journal, next_log_block); | 415 | err = jread(&bh, journal, next_log_block); |
| 416 | if (err) | 416 | if (err) |
| 417 | goto failed; | 417 | goto failed; |
| @@ -491,8 +491,8 @@ static int do_one_pass(journal_t *journal, | |||
| 491 | /* Recover what we can, but | 491 | /* Recover what we can, but |
| 492 | * report failure at the end. */ | 492 | * report failure at the end. */ |
| 493 | success = err; | 493 | success = err; |
| 494 | printk (KERN_ERR | 494 | printk(KERN_ERR |
| 495 | "JBD: IO error %d recovering " | 495 | "JBD2: IO error %d recovering " |
| 496 | "block %ld in log\n", | 496 | "block %ld in log\n", |
| 497 | err, io_block); | 497 | err, io_block); |
| 498 | } else { | 498 | } else { |
| @@ -520,7 +520,7 @@ static int do_one_pass(journal_t *journal, | |||
| 520 | journal->j_blocksize); | 520 | journal->j_blocksize); |
| 521 | if (nbh == NULL) { | 521 | if (nbh == NULL) { |
| 522 | printk(KERN_ERR | 522 | printk(KERN_ERR |
| 523 | "JBD: Out of memory " | 523 | "JBD2: Out of memory " |
| 524 | "during recovery.\n"); | 524 | "during recovery.\n"); |
| 525 | err = -ENOMEM; | 525 | err = -ENOMEM; |
| 526 | brelse(bh); | 526 | brelse(bh); |
| @@ -689,7 +689,7 @@ static int do_one_pass(journal_t *journal, | |||
| 689 | /* It's really bad news if different passes end up at | 689 | /* It's really bad news if different passes end up at |
| 690 | * different places (but possible due to IO errors). */ | 690 | * different places (but possible due to IO errors). */ |
| 691 | if (info->end_transaction != next_commit_ID) { | 691 | if (info->end_transaction != next_commit_ID) { |
| 692 | printk (KERN_ERR "JBD: recovery pass %d ended at " | 692 | printk(KERN_ERR "JBD2: recovery pass %d ended at " |
| 693 | "transaction %u, expected %u\n", | 693 | "transaction %u, expected %u\n", |
| 694 | pass, next_commit_ID, info->end_transaction); | 694 | pass, next_commit_ID, info->end_transaction); |
| 695 | if (!success) | 695 | if (!success) |
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 1e5c5ead5b0d..a0e41a4c080e 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c | |||
| @@ -125,7 +125,7 @@ static int start_this_handle(journal_t *journal, handle_t *handle, | |||
| 125 | unsigned long ts = jiffies; | 125 | unsigned long ts = jiffies; |
| 126 | 126 | ||
| 127 | if (nblocks > journal->j_max_transaction_buffers) { | 127 | if (nblocks > journal->j_max_transaction_buffers) { |
| 128 | printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n", | 128 | printk(KERN_ERR "JBD2: %s wants too many credits (%d > %d)\n", |
| 129 | current->comm, nblocks, | 129 | current->comm, nblocks, |
| 130 | journal->j_max_transaction_buffers); | 130 | journal->j_max_transaction_buffers); |
| 131 | return -ENOSPC; | 131 | return -ENOSPC; |
| @@ -564,7 +564,7 @@ static void warn_dirty_buffer(struct buffer_head *bh) | |||
| 564 | char b[BDEVNAME_SIZE]; | 564 | char b[BDEVNAME_SIZE]; |
| 565 | 565 | ||
| 566 | printk(KERN_WARNING | 566 | printk(KERN_WARNING |
| 567 | "JBD: Spotted dirty metadata buffer (dev = %s, blocknr = %llu). " | 567 | "JBD2: Spotted dirty metadata buffer (dev = %s, blocknr = %llu). " |
| 568 | "There's a risk of filesystem corruption in case of system " | 568 | "There's a risk of filesystem corruption in case of system " |
| 569 | "crash.\n", | 569 | "crash.\n", |
| 570 | bdevname(bh->b_bdev, b), (unsigned long long)bh->b_blocknr); | 570 | bdevname(bh->b_bdev, b), (unsigned long long)bh->b_blocknr); |
