Whamcloud - gitweb
Enable test_io debugging by default
authorTheodore Ts'o <tytso@mit.edu>
Mon, 1 Sep 2008 15:27:27 +0000 (11:27 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 1 Sep 2008 15:36:59 +0000 (11:36 -0400)
Test I/O debugging is incredibly useful for rooting out problems, so
let's enable by default, especially now that its overhead is only
incurred when it is needed.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
configure
configure.in
debian/rules
lib/ext2fs/Makefile.in

index 119e09c..5cf203e 100755 (executable)
--- a/configure
+++ b/configure
@@ -684,6 +684,7 @@ CHECKER_CMT
 LIB_EXT
 STATIC_LIB_EXT
 PROFILED_LIB_EXT
+TEST_IO_CMT
 DEBUGFS_CMT
 IMAGER_CMT
 RESIZER_CMT
@@ -1364,7 +1365,7 @@ Optional Features:
   --enable-checker       build checker libraries
   --enable-jbd-debug     enable journal debugging
   --enable-blkid-debug    enable blkid debugging
-  --enable-testio-debug   enable the use of the test I/O manager for debugging
+  --disable-testio-debug  disable the use of the test I/O manager for debugging
   --disable-debugfs      disable support of debugfs program
   --disable-imager       disable support of e2image program
   --disable-resizer      disable support of e2resize program
@@ -4009,7 +4010,9 @@ if test "${enable_testio_debug+set}" = set; then
 then
        { echo "$as_me:$LINENO: result: Disabling testio debugging" >&5
 echo "${ECHO_T}Disabling testio debugging" >&6; }
+       TEST_IO_CMT="#"
 else
+       TEST_IO_CMT=
        cat >>confdefs.h <<\_ACEOF
 #define CONFIG_TESTIO_DEBUG 1
 _ACEOF
@@ -4019,11 +4022,17 @@ echo "${ECHO_T}Enabling testio debugging" >&6; }
 fi
 
 else
-  { echo "$as_me:$LINENO: result: Disabling testio debugging by default" >&5
-echo "${ECHO_T}Disabling testio debugging by default" >&6; }
+  { echo "$as_me:$LINENO: result: Enabling testio debugging by default" >&5
+echo "${ECHO_T}Enabling testio debugging by default" >&6; }
+cat >>confdefs.h <<\_ACEOF
+#define CONFIG_TESTIO_DEBUG 1
+_ACEOF
+
+TEST_IO_CMT=
 
 fi
 
+
 # Check whether --enable-debugfs was given.
 if test "${enable_debugfs+set}" = set; then
   enableval=$enable_debugfs; if test "$enableval" = "no"
@@ -15893,8 +15902,8 @@ CHECKER_CMT!$CHECKER_CMT$ac_delim
 LIB_EXT!$LIB_EXT$ac_delim
 STATIC_LIB_EXT!$STATIC_LIB_EXT$ac_delim
 PROFILED_LIB_EXT!$PROFILED_LIB_EXT$ac_delim
+TEST_IO_CMT!$TEST_IO_CMT$ac_delim
 DEBUGFS_CMT!$DEBUGFS_CMT$ac_delim
-IMAGER_CMT!$IMAGER_CMT$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 73; then
@@ -15968,6 +15977,7 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+IMAGER_CMT!$IMAGER_CMT$ac_delim
 RESIZER_CMT!$RESIZER_CMT$ac_delim
 FSCK_PROG!$FSCK_PROG$ac_delim
 FSCK_MAN!$FSCK_MAN$ac_delim
@@ -16050,7 +16060,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 80; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index dbec692..fcca2ac 100644 (file)
@@ -356,17 +356,22 @@ dnl
 dnl handle --enable-testio-debug
 dnl
 AC_ARG_ENABLE([testio-debug],
-[  --enable-testio-debug   enable the use of the test I/O manager for debugging],
+[  --disable-testio-debug  disable the use of the test I/O manager for debugging],
 if test "$enableval" = "no"
 then
        AC_MSG_RESULT([Disabling testio debugging])
+       TEST_IO_CMT="#"
 else
+       TEST_IO_CMT=
        AC_DEFINE(CONFIG_TESTIO_DEBUG)
        AC_MSG_RESULT([Enabling testio debugging])
 fi
 ,
-AC_MSG_RESULT([Disabling testio debugging by default])
+AC_MSG_RESULT([Enabling testio debugging by default])
+AC_DEFINE(CONFIG_TESTIO_DEBUG)
+TEST_IO_CMT=
 )
+AC_SUBST(TEST_IO_CMT)
 dnl
 dnl handle --enable-debugfs
 dnl
index 4175619..7b20faf 100755 (executable)
@@ -120,7 +120,7 @@ COMMON_CONF_FLAGS =  \
 STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression
 
 BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \
-       --disable-nls --disable-imager \
+       --disable-nls --disable-imager --disable-testio-debug \
        --disable-uuidd --disable-tls \
        --disable-debugfs  --disable-e2initrd-helper
 
index 6f0ae62..dfbcecd 100644 (file)
@@ -12,11 +12,12 @@ INSTALL = @INSTALL@
 
 MK_CMDS=       _SS_DIR_OVERRIDE=../ss ../ss/mk_cmds
 
-@RESIZER_CMT@RESIZE_LIB_OBJS = dupfs.o test_io.o 
-
+@RESIZER_CMT@RESIZE_LIB_OBJS = dupfs.o
+@TEST_IO_CMT@TEST_IO_LIB_OBJS = test_io.o
 @IMAGER_CMT@E2IMAGE_LIB_OBJS = imager.o
 
 OBJS= $(DEBUGFS_LIB_OBJS) $(RESIZE_LIB_OBJS) $(E2IMAGE_LIB_OBJS) \
+       $(TEST_IO_LIB_OBJS) \
        ext2_err.o \
        alloc.o \
        alloc_sb.o \