aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-01-23 10:28:22 -0500
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-08 00:58:30 -0500
commit4138ec23820012009aecc2b02856c62872dd3c34 (patch)
treef222844308880d629b14339c384729f6e089fcf0
parent828b1c50ae11e6dda68f8dfefe43b74c7182b157 (diff)
nilfs2: append blocksize info to warnings during loading super blocks
At present, the same warning message can be output twice when nilfs detected a problem on super blocks: NILFS warning: broken superblock. using spare superblock. NILFS warning: broken superblock. using spare superblock. ... This is because these super blocks are reloaded with the block size written in a super block if it differs from the first block size, but this repetition looks somewhat confusing. So, we hint at what is going on by appending block size information to those messages. Reported-by: Wakko Warner <wakko@animx.eu.org> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
-rw-r--r--fs/nilfs2/the_nilfs.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c
index ad4ac607cf57..9098909d5cef 100644
--- a/fs/nilfs2/the_nilfs.c
+++ b/fs/nilfs2/the_nilfs.c
@@ -475,10 +475,13 @@ static int nilfs_load_super_block(struct the_nilfs *nilfs,
475 return -EIO; 475 return -EIO;
476 } 476 }
477 printk(KERN_WARNING 477 printk(KERN_WARNING
478 "NILFS warning: unable to read primary superblock\n"); 478 "NILFS warning: unable to read primary superblock "
479 } else if (!sbp[1]) 479 "(blocksize = %d)\n", blocksize);
480 } else if (!sbp[1]) {
480 printk(KERN_WARNING 481 printk(KERN_WARNING
481 "NILFS warning: unable to read secondary superblock\n"); 482 "NILFS warning: unable to read secondary superblock "
483 "(blocksize = %d)\n", blocksize);
484 }
482 485
483 /* 486 /*
484 * Compare two super blocks and set 1 in swp if the secondary 487 * Compare two super blocks and set 1 in swp if the secondary
@@ -505,7 +508,7 @@ static int nilfs_load_super_block(struct the_nilfs *nilfs,
505 508
506 if (!valid[!swp]) 509 if (!valid[!swp])
507 printk(KERN_WARNING "NILFS warning: broken superblock. " 510 printk(KERN_WARNING "NILFS warning: broken superblock. "
508 "using spare superblock.\n"); 511 "using spare superblock (blocksize = %d).\n", blocksize);
509 if (swp) 512 if (swp)
510 nilfs_swap_super_block(nilfs); 513 nilfs_swap_super_block(nilfs);
511 514