Skip to contentSkip to conversation

properly show journal checksum/async options

PATCH In review Eric Sandeen 2 participants 2 messages Sep 14, 2008 – Sep 20, 2008 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 properly show journal checksum/async options

The journal_checksum option is not being displayed in /proc/mounts ... add this to the show_options() output, but only if journal_async_commit is not specified, as that enables journal_checksum internally.

---

(Aside: this reminds me that we only show non-default options in show_options; has there been any discussion of whether these should be defaults?)

fs/ext4/super.c +4 -0
Index: linux-2.6/fs/ext4/super.c
===================================================================
@@ -746,8 +746,12 @@ static int ext4_show_options(struct seq_
 	 */
 	seq_puts(seq, ",barrier=");
 	seq_puts(seq, test_opt(sb, BARRIER) ? "1" : "0");
+	/* journal_async_commit enables journal_checksum internally */
 	if (test_opt(sb, JOURNAL_ASYNC_COMMIT))
 		seq_puts(seq, ",journal_async_commit");
+	else if (test_opt(sb, JOURNAL_CHECKSUM))
+		seq_puts(seq, ",journal_checksum");
+
 	if (test_opt(sb, NOBH))
 		seq_puts(seq, ",nobh");
 	if (!test_opt(sb, EXTENTS))
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Eric Sandeen

The journal_checksum option is not being displayed in /proc/mounts ... add this to the show_options() output, but only if journal_async_commit is not specified, as that enables journal_checksum internally.

I'll add it to the patch queue, probably combined with a patch to add journal_sync_commit, and with a patch to make journal_async_commit the default.

Quoted 3 lines

(Aside: this reminds me that we only show non-default options in show_options; has there been any discussion of whether these should be defaults?)

Good point, thanks for raising the question.

The reason why journal_async_commit wasn't turned on by default originally was because e2fsck didn't have support for journal checksums before e2fsprogs 1.41.0. At this point, it seems like turning on async_commit is the obvious (and performant) thing to do; any objections?

- Ted