From 149640fabcf140d8ede596b06ff8c191ca23caca Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 3 Jul 2015 16:29:35 -0400 Subject: [PATCH] configure: remove support to disable htree support The presence of --disable-htree is very much a legacy thing. Remove it since supporting the lack of htree support is pretty silly. Signed-off-by: Theodore Ts'o --- configure | 29 ----------------------------- configure.ac | 21 --------------------- e2fsck/dx_dirinfo.c | 3 --- e2fsck/e2fsck.c | 2 -- e2fsck/pass1.c | 2 -- e2fsck/pass2.c | 13 +------------ e2fsck/unix.c | 8 -------- lib/config.h.in | 3 --- tests/Makefile.in | 2 +- util/android_config.h | 1 - 10 files changed, 2 insertions(+), 82 deletions(-) diff --git a/configure b/configure index ca4105bd..81aafddb 100755 --- a/configure +++ b/configure @@ -770,7 +770,6 @@ LIB_EXT PROFILE_CMT BSDLIB_CMT ELF_CMT -HTREE_CMT Q ES E @@ -861,7 +860,6 @@ enable_relative_symlinks enable_symlink_relative_symlinks enable_symlink_build enable_verbose_makecmds -enable_htree enable_elf_shlibs enable_bsd_shlibs enable_profile @@ -1524,7 +1522,6 @@ Optional Features: --enable-symlink-build use symlinks while building instead of hard links --enable-verbose-makecmds enable verbose make command output - --disable-htree disable htree directory support --enable-elf-shlibs select ELF shared libraries --enable-bsd-shlibs select BSD shared libraries --enable-profile build profiling libraries @@ -4904,32 +4901,6 @@ fi - -# Check whether --enable-htree was given. -if test "${enable_htree+set}" = set; then : - enableval=$enable_htree; if test "$enableval" = "no" -then - HTREE_CMT=# - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling htree directory support" >&5 -$as_echo "Disabling htree directory support" >&6; } -else - HTREE_CMT= - $as_echo "#define ENABLE_HTREE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling htree directory support" >&5 -$as_echo "Enabling htree directory support" >&6; } -fi - -else - HTREE_CMT= -$as_echo "#define ENABLE_HTREE 1" >>confdefs.h - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling htree directory support by default" >&5 -$as_echo "Enabling htree directory support by default" >&6; } - -fi - - E2_PKG_CONFIG_STATIC=--static LDFLAG_DYNAMIC= PRIVATE_LIBS_CMT= diff --git a/configure.ac b/configure.ac index 9ebffae7..f3263c4a 100644 --- a/configure.ac +++ b/configure.ac @@ -253,27 +253,6 @@ AC_SUBST(E) AC_SUBST(ES) AC_SUBST(Q) dnl -dnl handle --enable-htree -dnl -AH_TEMPLATE([ENABLE_HTREE], [Define to 1 if ext3/4 htree support enabled]) -AC_ARG_ENABLE([htree], -[ --disable-htree disable htree directory support], -if test "$enableval" = "no" -then - HTREE_CMT=# - AC_MSG_RESULT([Disabling htree directory support]) -else - HTREE_CMT= - AC_DEFINE(ENABLE_HTREE, 1) - AC_MSG_RESULT([Enabling htree directory support]) -fi -, -HTREE_CMT= -AC_DEFINE(ENABLE_HTREE, 1) -AC_MSG_RESULT([Enabling htree directory support by default]) -) -AC_SUBST(HTREE_CMT) -dnl dnl This needs to be before all of the --enable-*-shlibs options dnl E2_PKG_CONFIG_STATIC=--static diff --git a/e2fsck/dx_dirinfo.c b/e2fsck/dx_dirinfo.c index be53fff0..c7b60568 100644 --- a/e2fsck/dx_dirinfo.c +++ b/e2fsck/dx_dirinfo.c @@ -7,7 +7,6 @@ #include "config.h" #include "e2fsck.h" -#ifdef ENABLE_HTREE /* * This subroutine is called during pass1 to create a directory info @@ -151,5 +150,3 @@ struct dx_dir_info *e2fsck_dx_dir_info_iter(e2fsck_t ctx, int *control) return(ctx->dx_dir_info + (*control)++); } - -#endif /* ENABLE_HTREE */ diff --git a/e2fsck/e2fsck.c b/e2fsck/e2fsck.c index cab90b87..dd8150be 100644 --- a/e2fsck/e2fsck.c +++ b/e2fsck/e2fsck.c @@ -89,9 +89,7 @@ errcode_t e2fsck_reset_context(e2fsck_t ctx) ctx->fs->dblist = 0; } e2fsck_free_dir_info(ctx); -#ifdef ENABLE_HTREE e2fsck_free_dx_dir_info(ctx); -#endif if (ctx->refcount) { ea_refcount_free(ctx->refcount); ctx->refcount = 0; diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 3777e422..c894e7af 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -3068,9 +3068,7 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx, inode->i_flags &= ~EXT2_INDEX_FL; dirty_inode++; } else { -#ifdef ENABLE_HTREE e2fsck_add_dx_dir(ctx, ino, pb.last_block+1); -#endif } } diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c index ecc0aaa0..dc1a6efd 100644 --- a/e2fsck/pass2.c +++ b/e2fsck/pass2.c @@ -175,7 +175,6 @@ void e2fsck_pass2(e2fsck_t ctx) return; } -#ifdef ENABLE_HTREE for (i=0; (dx_dir = e2fsck_dx_dir_info_iter(ctx, &i)) != 0;) { if (ctx->flags & E2F_FLAG_SIGNAL_MASK) return; @@ -264,7 +263,7 @@ void e2fsck_pass2(e2fsck_t ctx) } } e2fsck_free_dx_dir_info(ctx); -#endif + ext2fs_free_mem(&buf); ext2fs_free_dblist(fs->dblist); @@ -543,7 +542,6 @@ static _INLINE_ int check_filetype(e2fsck_t ctx, return 1; } -#ifdef ENABLE_HTREE static void parse_int_node(ext2_filsys fs, struct ext2_db_entry2 *db, struct check_dir_struct *cd, @@ -673,7 +671,6 @@ clear_and_exit: dx_dir->numblocks = 0; e2fsck_rehash_dir_later(cd->ctx, cd->pctx.ino); } -#endif /* ENABLE_HTREE */ /* * Given a busted directory, try to salvage it somehow. @@ -883,9 +880,7 @@ static int check_dir_block(ext2_filsys fs, void *priv_data) { struct dx_dir_info *dx_dir; -#ifdef ENABLE_HTREE struct dx_dirblock_info *dx_db = 0; -#endif /* ENABLE_HTREE */ struct ext2_dir_entry *dirent, *prev, dot, dotdot; ext2_dirhash_t hash; unsigned int offset = 0; @@ -1038,7 +1033,6 @@ inline_read_fail: memcpy(buf, buf2, fs->blocksize); ext2fs_free_mem(&buf2); } -#ifdef ENABLE_HTREE dx_dir = e2fsck_get_dx_dir_info(ctx, ino); if (dx_dir && dx_dir->numblocks) { if (db->blockcnt >= dx_dir->numblocks) { @@ -1088,7 +1082,6 @@ inline_read_fail: is_leaf = 0; } out_htree: -#endif /* ENABLE_HTREE */ /* Leaf node with no space for csum? Rebuild dirs in pass 3A. */ if (is_leaf && !inline_data_size && failed_csum && @@ -1394,7 +1387,6 @@ skip_checksum: if (check_filetype(ctx, dirent, ino, &cd->pctx)) dir_modified++; -#ifdef ENABLE_HTREE if (dx_db) { ext2fs_dirhash(dx_dir->hashversion, dirent->name, ext2fs_dirent_name_len(dirent), @@ -1404,7 +1396,6 @@ skip_checksum: if (hash > dx_db->max_hash) dx_db->max_hash = hash; } -#endif /* * If this is a directory, then mark its parent in its @@ -1480,7 +1471,6 @@ skip_checksum: #if 0 printf("\n"); #endif -#ifdef ENABLE_HTREE if (dx_db) { #ifdef DX_DEBUG printf("db_block %d, type %d, min_hash 0x%0x, max_hash 0x%0x\n", @@ -1492,7 +1482,6 @@ skip_checksum: (dx_db->type == DX_DIRBLOCK_NODE)) parse_int_node(fs, db, cd, dx_dir, buf, failed_csum); } -#endif /* ENABLE_HTREE */ if (offset != max_block_size) { cd->pctx.num = rec_len + offset - max_block_size; diff --git a/e2fsck/unix.c b/e2fsck/unix.c index f75d90d6..e1222f3a 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -1712,14 +1712,6 @@ print_unsupp_features: log_err(ctx, "\n"); goto get_newer; } -#ifndef ENABLE_HTREE - if (sb->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) { - log_err(ctx, _("%s: e2fsck not compiled with HTREE support,\n\t" - "but filesystem %s has HTREE directories.\n"), - ctx->program_name, ctx->device_name); - goto get_newer; - } -#endif /* * If the user specified a specific superblock, presumably the diff --git a/lib/config.h.in b/lib/config.h.in index bec4845d..5707bb24 100644 --- a/lib/config.h.in +++ b/lib/config.h.in @@ -38,9 +38,6 @@ /* Define to 1 to enable bitmap stats. */ #undef ENABLE_BMAP_STATS_OPS -/* Define to 1 if ext3/4 htree support enabled */ -#undef ENABLE_HTREE - /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS diff --git a/tests/Makefile.in b/tests/Makefile.in index 37a043ea..99b6d68d 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -16,7 +16,7 @@ all:: @DO_TEST_SUITE@ test_one test_script test_one: $(srcdir)/test_one.in Makefile mke2fs.conf @echo "Creating test_one script..." @echo "#!/bin/sh" > test_one -@HTREE_CMT@ @echo "HTREE=y" >> test_one + @echo "HTREE=y" >> test_one @QUOTA_CMT@ @echo "QUOTA=y" >> test_one @echo "SRCDIR=@srcdir@" >> test_one @echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one diff --git a/util/android_config.h b/util/android_config.h index 55d728a4..906266c2 100644 --- a/util/android_config.h +++ b/util/android_config.h @@ -7,7 +7,6 @@ #define ROOT_SYSCONFDIR "/etc" #define DISABLE_BACKTRACE 1 -#define ENABLE_HTREE 1 #define HAVE_DIRENT_H 1 #define HAVE_ERRNO_H 1 #define HAVE_EXT2_IOCTLS 1