]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
mke2fs: Don't try to create the journal in super-only mode
authorTheodore Ts'o <tytso@mit.edu>
Tue, 31 Mar 2009 11:42:24 +0000 (07:42 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 31 Mar 2009 11:42:24 +0000 (07:42 -0400)
Since we aren't initializing the inode table, creating the journal
will just fail.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/mke2fs.c

index e69e5ceab82bae095a50b218bc239d1a6c7b2a6b..4f50ffa9e12ce352ec92f60276bdfb00e329ffe5 100644 (file)
@@ -2079,6 +2079,12 @@ int main (int argc, char *argv[])
                    EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
                journal_blocks = figure_journal_size(journal_size, fs);
 
+               if (super_only) {
+                       printf(_("Skipping journal creation in super-only mode\n"));
+                       fs->super->s_journal_inum = EXT2_JOURNAL_INO;
+                       goto no_journal;
+               }
+
                if (!journal_blocks) {
                        fs->super->s_feature_compat &=
                                ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;