Re: Once more: Recovering a damaged ext4 fs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK, here's a patch that should allow mke2fs -S to work.  It should be
applied against the e2fsprogs 1.41.4.

Sorry for the delay in getting this to you; things have been crazy
busy on my end.

						- Ted

commit a620baddee647faf42c49ee2e04ee3f667149d68
Author: Theodore Ts'o <tytso@xxxxxxx>
Date:   Tue Mar 31 07:42:24 2009 -0400

    mke2fs: Don't try to create the journal in super-only mode
    
    Since we aren't initializing the inode table, creating the journal
    will just fail.
    
    Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index e69e5ce..4f50ffa 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux