Skip to contentSkip to conversation

make all feature-related printks KERN_INFO and print barrier status as well

PATCH In review Eric Sandeen 2 participants 3 messages Sep 8, 2008 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make all feature-related printks KERN_INFO and print barrier status as well

A very trivial little tidy-up patch.

This slightly duplicates a little of patches/ext4_fix_printk_checkpatch_issues but just in one hunk, easily fixed up.

Various feature printk's come out at different levels, so for example at my default logging level I see mballoc & extents messages, but not delalloc, even though they are all on.

Also, since default barrier behavior has changed, I thought perhaps always printing the barrier state might be a good idea.

Seems ok?

Thanks,
-Eric

------------------------

Make extents, mballoc, and delalloc feature printks all at log level KERN_INFO.

Also print barrier status, whether on or off, since the defaults recently changed.

---

fs/ext4/extents.c +1 -1
Index: linux-2.6/fs/ext4/extents.c
===================================================================
@@ -2142,7 +2142,7 @@ void ext4_ext_init(struct super_block *s
 	 */
 
 	if (test_opt(sb, EXTENTS)) {
-		printk("EXT4-fs: file extents enabled");
+		printk(KERN_INFO "EXT4-fs: file extents enabled");
 #ifdef AGGRESSIVE_TEST
 		printk(", aggressive tests");
 #endif
fs/ext4/mballoc.c +1 -1
Index: linux-2.6/fs/ext4/mballoc.c
===================================================================
@@ -2560,7 +2560,7 @@ int ext4_mb_init(struct super_block *sb,
 	ext4_mb_init_per_dev_proc(sb);
 	ext4_mb_history_init(sb);
 
-	printk("EXT4-fs: mballoc enabled\n");
+	printk(KERN_INFO "EXT4-fs: mballoc enabled\n");
 	return 0;
 }
 
fs/ext4/super.c +5 -0
Index: linux-2.6/fs/ext4/super.c
===================================================================
@@ -2715,6 +2715,11 @@ static int ext4_load_journal(struct supe
 			return -EINVAL;
 	}
 
+	if (journal->j_flags & JBD2_BARRIER)
+		printk(KERN_INFO "EXT4-fs: barriers enabled\n");
+	else
+		printk(KERN_INFO "EXT4-fs: barriers disabled\n");
+
 	if (!really_read_only && test_opt(sb, UPDATE_JOURNAL)) {
 		err = jbd2_journal_update_format(journal);
 		if (err)  {
maintainer
#1 lore raw
Quoted 6 lines · Eric Sandeen

A very trivial little tidy-up patch.

This slightly duplicates a little of patches/ext4_fix_printk_checkpatch_issues but just in one hunk, easily fixed up.

Quoted 6 lines

Various feature printk's come out at different levels, so for example at my default logging level I see mballoc & extents messages, but not delalloc, even though they are all on.

Also, since default barrier behavior has changed, I thought perhaps always printing the barrier state might be a good idea.

Looks good to me. Any reason not to merge it with the ext4_fix_printk_checkpatches_issues? Actually what I was thinking about doing was to segregate out all of the printk level issues from everything else, just to make it easier to understand/audit the cleanup patch(es).

- Ted

#2 lore raw
Quoted 14 lines · Theodore Tso
Quoted 6 lines · Eric Sandeen

A very trivial little tidy-up patch.

This slightly duplicates a little of patches/ext4_fix_printk_checkpatch_issues but just in one hunk, easily fixed up.

Quoted 6 lines

Various feature printk's come out at different levels, so for example at my default logging level I see mballoc & extents messages, but not delalloc, even though they are all on.

Also, since default barrier behavior has changed, I thought perhaps always printing the barrier state might be a good idea.

Quoted 7 lines

Looks good to me. Any reason not to merge it with the ext4_fix_printk_checkpatches_issues? Actually what I was thinking about doing was to segregate out all of the printk level issues from everything else, just to make it easier to understand/audit the cleanup patch(es).

- Ted

Sure, it could be merged. The patch I sent actually changed some behavior, and was limited to mount-time feature prints, so thought it might make sense on its own.

Either way is fine by me.

-Eric