[PATCH][e2fsprogs] Allow user to disable Undo manager through MKE2FS_SCRATCH_DIR

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

 



From: Jose R. Santos <jrs@xxxxxxxxxx>

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@xxxxxxxxxx>
--

 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) {

--
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