Remove compression support

The compression patches were an out-of-kernel patch set that was (a)
only available for ext2, (b) something that was never could be
stablized due to file system corruption, and (c) the most recent
patches were for 3.1, last updated in 2011.

The history of the compression patches has been a bit checkered.
There is a long history here at http://e2compr.sourceforge.net which
lists the perspective of the people working on it from the e2compr
side.

From the ext2/3/4 mainline developers' perspective, initial
compression support was added to e2fsprogs in 2000 (in the Linux 2.2
era), but due to stability concerns the kernel patches were never
merged into the mainline kernel.  While there were some sporadic
efforts to try to get the ext2 compression patches working in the 2.4
and 2.6 era, by that time mainline work had moved on to ext4, and the
e2compr approach could only work with 32-bit block numbers and
indirect mapped files.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debian
Theodore Ts'o 2015-04-12 08:22:07 -04:00
parent 8dbcedd702
commit 4a05268cf8
13 changed files with 9 additions and 129 deletions

24
configure vendored
View File

@ -859,7 +859,6 @@ enable_relative_symlinks
enable_symlink_relative_symlinks
enable_symlink_build
enable_verbose_makecmds
enable_compression
enable_htree
enable_elf_shlibs
enable_bsd_shlibs
@ -1522,7 +1521,6 @@ Optional Features:
--enable-symlink-build use symlinks while building instead of hard links
--enable-verbose-makecmds enable verbose make command output
--enable-compression enable EXPERIMENTAL compression support
--enable-htree enable EXPERIMENTAL htree directory support
--enable-elf-shlibs select ELF shared libraries
--enable-bsd-shlibs select BSD shared libraries
@ -4902,28 +4900,6 @@ fi
# Check whether --enable-compression was given.
if test "${enable_compression+set}" = set; then :
enableval=$enable_compression; if test "$enableval" = "no"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling compression support" >&5
$as_echo "Disabling compression support" >&6; }
else
$as_echo "#define ENABLE_COMPRESSION 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling compression support" >&5
$as_echo "Enabling compression support" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compression support is experimental" >&5
$as_echo "$as_me: WARNING: Compression support is experimental" >&2;}
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling compression support by default" >&5
$as_echo "Disabling compression support by default" >&6; }
fi
# Check whether --enable-htree was given.
if test "${enable_htree+set}" = set; then :

View File

@ -253,23 +253,6 @@ AC_SUBST(E)
AC_SUBST(ES)
AC_SUBST(Q)
dnl
dnl handle --enable-compression
dnl
AC_ARG_ENABLE([compression],
[ --enable-compression enable EXPERIMENTAL compression support],
if test "$enableval" = "no"
then
AC_MSG_RESULT([Disabling compression support])
else
AC_DEFINE(ENABLE_COMPRESSION, 1,
[Define to 1 if ext2 compression enabled])
AC_MSG_RESULT([Enabling compression support])
AC_MSG_WARN([Compression support is experimental])
fi
,
AC_MSG_RESULT([Disabling compression support by default])
)
dnl
dnl handle --enable-htree
dnl
AH_TEMPLATE([ENABLE_HTREE], [Define to 1 if ext3/4 htree support enabled])

View File

@ -2874,18 +2874,6 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx,
inlinedata_fs = (ctx->fs->super->s_feature_incompat &
EXT4_FEATURE_INCOMPAT_INLINE_DATA);
if (inode->i_flags & EXT2_COMPRBLK_FL) {
if (fs->super->s_feature_incompat &
EXT2_FEATURE_INCOMPAT_COMPRESSION)
pb.compressed = 1;
else {
if (fix_problem(ctx, PR_1_COMPR_SET, pctx)) {
inode->i_flags &= ~EXT2_COMPRBLK_FL;
dirty_inode++;
}
}
}
if (check_ext_attr(ctx, pctx, block_buf)) {
if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
goto out;
@ -3159,28 +3147,6 @@ static int process_block(ext2_filsys fs,
pctx = p->pctx;
ctx = p->ctx;
if (p->compressed && (blk == EXT2FS_COMPRESSED_BLKADDR)) {
/* todo: Check that the comprblk_fl is high, that the
blkaddr pattern looks right (all non-holes up to
first EXT2FS_COMPRESSED_BLKADDR, then all
EXT2FS_COMPRESSED_BLKADDR up to end of cluster),
that the feature_incompat bit is high, and that the
inode is a regular file. If we're doing a "full
check" (a concept introduced to e2fsck by e2compr,
meaning that we look at data blocks as well as
metadata) then call some library routine that
checks the compressed data. I'll have to think
about this, because one particularly important
problem to be able to fix is to recalculate the
cluster size if necessary. I think that perhaps
we'd better do most/all e2compr-specific checks
separately, after the non-e2compr checks. If not
doing a full check, it may be useful to test that
the personality is linux; e.g. if it isn't then
perhaps this really is just an illegal block. */
return 0;
}
/*
* For a directory, add logical block zero for processing even if it's
* not mapped or we'll be perennially stuck with broken "." and ".."
@ -3209,7 +3175,7 @@ static int process_block(ext2_filsys fs,
* file be contiguous. (Which can never be true for really
* big files that are greater than a block group.)
*/
if (!HOLE_BLKADDR(p->previous_block) && p->ino != EXT2_RESIZE_INO) {
if (p->previous_block && p->ino != EXT2_RESIZE_INO) {
if (p->previous_block+1 != blk) {
if (ctx->options & E2F_OPT_FRAGCHECK) {
char type = '?';
@ -3383,11 +3349,6 @@ static int process_bad_block(ext2_filsys fs,
struct problem_context *pctx;
e2fsck_t ctx;
/*
* Note: This function processes blocks for the bad blocks
* inode, which is never compressed. So we don't use HOLE_BLKADDR().
*/
if (!blk)
return 0;

View File

@ -364,7 +364,7 @@ static int process_pass1b_block(ext2_filsys fs EXT2FS_ATTR((unused)),
blk64_t lc, pc;
problem_t op;
if (HOLE_BLKADDR(*block_nr))
if (*block_nr == 0)
return 0;
p = (struct process_block_struct *) priv_data;
ctx = p->ctx;
@ -628,7 +628,7 @@ static int delete_file_block(ext2_filsys fs,
pb = (struct process_block_struct *) priv_data;
ctx = pb->ctx;
if (HOLE_BLKADDR(*block_nr))
if (*block_nr == 0)
return 0;
c = EXT2FS_B2C(fs, *block_nr);
@ -768,7 +768,7 @@ static int clone_file_block(ext2_filsys fs,
ctx = cs->ctx;
deferred_dec_badcount(cs);
if (HOLE_BLKADDR(*block_nr))
if (*block_nr == 0)
return 0;
c = EXT2FS_B2C(fs, blockcnt);

View File

@ -1590,7 +1590,7 @@ static int deallocate_inode_block(ext2_filsys fs,
{
struct del_block *p = priv_data;
if (HOLE_BLKADDR(*block_nr))
if (*block_nr == 0)
return 0;
if ((*block_nr < fs->super->s_first_data_block) ||
(*block_nr >= ext2fs_blocks_count(fs->super)))

View File

@ -711,11 +711,6 @@ static struct e2fsck_problem problem_table[] = {
"or append-only flag set. "),
PROMPT_CLEAR, PR_PREEN_OK | PR_PREEN_NO | PR_NO_OK },
/* Compression flag set on an inode when filesystem doesn't support it */
{ PR_1_COMPR_SET,
N_("@i %i has @cion flag set on @f without @cion support. "),
PROMPT_CLEAR, 0 },
/* Non-zero size for device, fifo or socket inode */
{ PR_1_SET_NONZSIZE,
N_("Special (@v/socket/fifo) @i %i has non-zero size. "),

View File

@ -415,8 +415,8 @@ struct problem_context {
/* Immutable flag set on a device or socket inode */
#define PR_1_SET_IMMUTABLE 0x010030
/* Compression flag set on a non-compressed filesystem */
#define PR_1_COMPR_SET 0x010031
/* Compression flag set on a non-compressed filesystem -- no longer used*/
/* #define PR_1_COMPR_SET 0x010031 */
/* Non-zero size on on device, fifo or socket inode */
#define PR_1_SET_NONZSIZE 0x010032

View File

@ -131,7 +131,7 @@ static int fill_dir_block(ext2_filsys fs,
fd->ino);
dir = (fd->buf+offset);
if (HOLE_BLKADDR(*block_nr)) {
if (*block_nr == 0) {
memset(dir, 0, fs->blocksize);
dirent = (struct ext2_dir_entry *) dir;
(void) ext2fs_set_rec_len(fs, fs->blocksize, dirent);

View File

@ -76,7 +76,7 @@ static int release_inode_block(ext2_filsys fs,
pctx->blk = blk;
pctx->blkcount = blockcnt;
if (HOLE_BLKADDR(blk))
if (blk == 0)
return 0;
if ((blk < fs->super->s_first_data_block) ||

View File

@ -1557,12 +1557,6 @@ print_unsupp_features:
log_err(ctx, "\n");
goto get_newer;
}
#ifdef ENABLE_COMPRESSION
if (sb->s_feature_incompat & EXT2_FEATURE_INCOMPAT_COMPRESSION)
log_err(ctx, _("%s: warning: compression support "
"is experimental.\n"),
ctx->program_name);
#endif
#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"

View File

@ -38,9 +38,6 @@
/* Define to 1 to enable bitmap stats. */
#undef ENABLE_BMAP_STATS_OPS
/* Define to 1 if ext2 compression enabled */
#undef ENABLE_COMPRESSION
/* Define to 1 if ext3/4 htree support enabled */
#undef ENABLE_HTREE

View File

@ -37,11 +37,6 @@ static struct flags_name flags_array[] = {
{ EXT2_NODUMP_FL, "d", "No_Dump" },
{ EXT2_NOATIME_FL, "A", "No_Atime" },
{ EXT2_COMPR_FL, "c", "Compression_Requested" },
#ifdef ENABLE_COMPRESSION
{ EXT2_COMPRBLK_FL, "B", "Compressed_File" },
{ EXT2_DIRTY_FL, "Z", "Compressed_Dirty_File" },
{ EXT2_NOCOMPR_FL, "X", "Compression_Raw_Access" },
#endif
{ EXT4_ENCRYPT_FL, "E", "Encrypted" },
{ EXT3_JOURNAL_DATA_FL, "j", "Journaled_Data" },
{ EXT2_INDEX_FL, "I", "Indexed_directory" },

View File

@ -546,13 +546,6 @@ typedef struct ext2_icount *ext2_icount_t;
#define EXT2_CHECK_MAGIC(struct, code) \
if ((struct)->magic != (code)) return (code)
/*
* For ext2 compression support
*/
#define EXT2FS_COMPRESSED_BLKADDR ((blk_t) -1)
#define HOLE_BLKADDR(_b) ((_b) == 0 || (_b) == EXT2FS_COMPRESSED_BLKADDR)
/*
* Features supported by this version of the library
*/
@ -564,19 +557,6 @@ typedef struct ext2_icount *ext2_icount_t;
EXT2_FEATURE_COMPAT_EXT_ATTR|\
EXT4_FEATURE_COMPAT_SPARSE_SUPER2)
/* This #ifdef is temporary until compression is fully supported */
#ifdef ENABLE_COMPRESSION
#ifndef I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL
/* If the below warning bugs you, then have
`CPPFLAGS=-DI_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL' in your
environment at configure time. */
#warning "Compression support is experimental"
#endif
#define EXT2_LIB_INCOMPAT_COMPRESSION EXT2_FEATURE_INCOMPAT_COMPRESSION
#else
#define EXT2_LIB_INCOMPAT_COMPRESSION (0)
#endif
#ifdef CONFIG_MMP
#define EXT4_LIB_INCOMPAT_MMP EXT4_FEATURE_INCOMPAT_MMP
#else
@ -590,7 +570,6 @@ typedef struct ext2_icount *ext2_icount_t;
#endif
#define EXT2_LIB_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE|\
EXT2_LIB_INCOMPAT_COMPRESSION|\
EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|\
EXT2_FEATURE_INCOMPAT_META_BG|\
EXT3_FEATURE_INCOMPAT_RECOVER|\