diff options
author | Theodore Ts'o <tytso@mit.edu> | 2008-09-16 14:36:17 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-09-16 14:36:17 -0400 |
commit | 05496769e5da83ce22ed97345afd9c7b71d6bd24 (patch) | |
tree | 545c4d66296fe69ab24d34fd2f0298fb8ee66e4f /fs/ext4 | |
parent | 899fc1a4cf404747de2666534d508804597ee22f (diff) |
jbd2: clean up how the journal device name is printed
Calculate the journal device name once and stash it away in the
journal_s structure. This avoids needing to call bdevname()
everywhere and reduces stack usage by not needing to allocate an
on-stack buffer. In addition, we eliminate the '/' that can appear in
device names (e.g. "cciss/c0d0p9" --- see kernel bugzilla #11321) that
can cause problems when creating proc directory names, and include the
inode number to support ocfs2 which creates multiple journals with
different inode numbers.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/super.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index f58cc0309dc9..64e1c21eb5d2 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -1476,15 +1476,9 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es, | |||
1476 | EXT4_INODES_PER_GROUP(sb), | 1476 | EXT4_INODES_PER_GROUP(sb), |
1477 | sbi->s_mount_opt); | 1477 | sbi->s_mount_opt); |
1478 | 1478 | ||
1479 | if (EXT4_SB(sb)->s_journal->j_inode == NULL) { | 1479 | printk(KERN_INFO "EXT4 FS on %s, %s journal on %s\n", |
1480 | char b[BDEVNAME_SIZE]; | 1480 | sb->s_id, EXT4_SB(sb)->s_journal->j_inode ? "internal" : |
1481 | 1481 | "external", EXT4_SB(sb)->s_journal->j_devname); | |
1482 | printk(KERN_INFO "EXT4 FS on %s, external journal on %s\n", | ||
1483 | sb->s_id, bdevname(EXT4_SB(sb)->s_journal->j_dev, b)); | ||
1484 | } else { | ||
1485 | printk(KERN_INFO "EXT4 FS on %s, internal journal\n", | ||
1486 | sb->s_id); | ||
1487 | } | ||
1488 | return res; | 1482 | return res; |
1489 | } | 1483 | } |
1490 | 1484 | ||