linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Akira Fujita <a-fujita@rs.jp.nec.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 1/2] e2fsprogs: fix data lost with mke2fs -S
Date: Mon, 27 Feb 2012 00:54:35 -0500	[thread overview]
Message-ID: <20120227055435.GC9881@thunk.org> (raw)
In-Reply-To: <4F434328.2000409@rs.jp.nec.com>

On Tue, Feb 21, 2012 at 04:09:28PM +0900, Akira Fujita wrote:
> 
> 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.

					- Ted

commit 30ac1ce7df719e40b0c3c612696ada7c9ebbaed2
Author: Theodore Ts'o <tytso@mit.edu>
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" <tytso@mit.edu>

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 {

  reply	other threads:[~2012-02-27  5:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22  8:30 [PATCH 1/2] e2fsprogs: fix data lost with mke2fs -S Akira Fujita
2012-02-17  4:20 ` Ted Ts'o
2012-02-21  7:09   ` Akira Fujita
2012-02-27  5:54     ` Ted Ts'o [this message]
2012-02-27  6:26       ` Akira Fujita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120227055435.GC9881@thunk.org \
    --to=tytso@mit.edu \
    --cc=a-fujita@rs.jp.nec.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).