lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 13 Sep 2014 15:11:45 -0700
From:	"Darrick J. Wong" <darrick.wong@...cle.com>
To:	tytso@....edu, darrick.wong@...cle.com
Cc:	linux-ext4@...r.kernel.org
Subject: [PATCH 05/34] debugfs: manage needs_recover feature when messing
 with the journal

Set the needs_recover incompat feature when debugfs writes journal
transactions so that we actually replay the journal contents at the
next mount.

Likewise, clear it if we successfully recover the journal.

Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
---
 debugfs/do_journal.c |    7 +++++++
 1 file changed, 7 insertions(+)


diff --git a/debugfs/do_journal.c b/debugfs/do_journal.c
index 711ed27..a17af6e 100644
--- a/debugfs/do_journal.c
+++ b/debugfs/do_journal.c
@@ -158,6 +158,8 @@ static errcode_t journal_commit_trans(journal_transaction_t *trans)
 	trans->flags &= ~J_TRANS_OPEN;
 	trans->block++;
 
+	trans->fs->super->s_feature_incompat |= EXT3_FEATURE_INCOMPAT_RECOVER;
+	ext2fs_mark_super_dirty(trans->fs);
 error:
 	if (cbh)
 		brelse(cbh);
@@ -979,4 +981,9 @@ void do_journal_run(int argc, char *argv[])
 	err = ext2fs_run_ext3_journal(&current_fs);
 	if (err)
 		com_err("journal_run", err, "while recovering journal");
+	else {
+		current_fs->super->s_feature_incompat &=
+				~EXT3_FEATURE_INCOMPAT_RECOVER;
+		ext2fs_mark_super_dirty(current_fs);
+	}
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ