public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][e2fsprogs] Allow user to disable Undo manager through MKE2FS_SCRATCH_DIR
@ 2008-04-04 14:02 Jose R. Santos
  2008-04-06 22:19 ` Theodore Tso
  0 siblings, 1 reply; 5+ messages in thread
From: Jose R. Santos @ 2008-04-04 14:02 UTC (permalink / raw)
  To: Theodore Ts'o, linux-ext4

From: Jose R. Santos <jrs@us.ibm.com>

Allow user to disable Undo manager through MKE2FS_SCRATCH_DIR

Undo manager is a bit annoying when doing e2fsprogs testing since it
makes mke2fs significatly slower.  Use the MKE2FS_SCRATCH_DIR=disable
enviroment value to disable undo manager for those of us that blow up
filesystems on a regular basis.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
--

 misc/mke2fs.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)


diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index c8170f0..3f9cbe2 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1802,6 +1802,13 @@ static int filesystem_exist(const char *name)
 	__u16	s_magic;
 	struct ext2_super_block super;
 	io_manager manager = unix_io_manager;
+	char *tdb_dir;
+
+	tdb_dir = getenv("MKE2FS_SCRATCH_DIR");
+	if (tdb_dir && !strcmp(tdb_dir, "disable")) {
+		retval = 0;
+		goto open_err_out;
+	}
 
 	retval = manager->open(name, IO_FLAG_EXCLUSIVE,  &channel);
 	if (retval) {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-07 15:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-04 14:02 [PATCH][e2fsprogs] Allow user to disable Undo manager through MKE2FS_SCRATCH_DIR Jose R. Santos
2008-04-06 22:19 ` Theodore Tso
2008-04-07  1:44   ` Eric Sandeen
2008-04-07  4:20     ` Theodore Tso
2008-04-07 15:02   ` Aneesh Kumar K.V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox