Thread (5 messages) 5 messages, 2 authors, 2012-02-27

Re: [PATCH 1/2] e2fsprogs: fix data lost with mke2fs -S

From: Akira Fujita <hidden>
Date: 2012-02-27 06:26:26

(2012/02/27 14:54), Ted Ts'o wrote:
On Tue, Feb 21, 2012 at 04:09:28PM +0900, Akira Fujita wrote:
quoted
I tried to mkfs -S and e2fsck to salvage file
with e2fsprogs 1.42.1 (commit: 5ab348723247).
But it seemed that the file was removed after e2fsck.
Oops, sorry.  I made a stupid mistake in my mke2fs patch.  This should
fix things so that your script works correctly.
Worked fine, thank you for you work. :)

Akira Fujita
 
quoted hunk ↗ jump to hunk
					- Ted

commit 30ac1ce7df719e40b0c3c612696ada7c9ebbaed2
Author: Theodore Ts'o[off-list ref]
Date:   Mon Feb 27 00:51:39 2012 -0500

     mke2fs: make sure bg 0's unused inode count field is zero'ed for mke2fs -S

     There was a bug/typo in commit ba9e0afc5 which caused the first block
     group (bg #0) to not have its unused inode count field to get set to
     zero in the case of mke2fs -S.  This caused inodes in the first block
     group to not be recoverable via mke2fs -S.  Oops.

     Signed-off-by: "Theodore Ts'o"[off-list ref]
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index c70c1b4..51435d2 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -2442,7 +2442,7 @@ int main (int argc, char *argv[])
  		 */
  		if (fs->super->s_feature_ro_compat&
  		EXT4_FEATURE_RO_COMPAT_GDT_CSUM) {
-			for (i = 1; i<  fs->group_desc_count; i++)
+			for (i = 0; i<  fs->group_desc_count; i++)
  				ext2fs_bg_itable_unused_set(fs, i, 0);
  		}
  	} else {
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help