Merge branch 'maint' into next

Conflicts:
	RELEASE-NOTES
	e2fsck/Makefile.in
	lib/config.h.in
	version.h
pu
Theodore Ts'o 2013-06-16 18:54:01 -04:00
commit 8b9eb12807
59 changed files with 907 additions and 667 deletions

2
README
View File

@ -1,4 +1,4 @@
This is the new version (1.42.7) of the second extended file
This is the new version (1.42.8) of the second extended file
system management programs.
From time to time, I release new versions of e2fsprogs, to fix

View File

@ -1,4 +1,4 @@
E2fsprogs 1.43-WIP (September 22, 2012)
E2fsprogs 1.43-WIP (June 16, 2012)
=======================================
Add support for the ext4 metadata checksum feature.
@ -18,6 +18,80 @@ needed by boot loadsers such as yaboot.
Support for the MMP feature can now be disabled at compile time.
E2fsprogs 1.42.8 (June 16, 2013)
================================
As a part of mke2fs's option parsing cleanup, the use of the -R option
will give a warning that it is depreated (it has been so documented
since 2005) and -E should be used instead.
Mke2fs will not give warnings about the bigalloc and quota options in
quiet mode.
Debugfs was erroneously giving spurious error messages for certain
extent_inode subcommands which take arguments (split_node,
replace_node, and insert_node). This has been fixed.
Fix the parsing of the 's' (sectors) in parse_num_blocks2, which among
other programs is used by mke2fs.
Change mke2fs so that it does not set the root directory to the real
uid/gid of the mke2fs process. Add the extended option root_owner to
override this behavior.
E2fsck will now detect and repair corrupted extent trees which contain
invalid extents at the end of the extent tree leaf block.
E2fsck will now longer complain about zero length extended attribute
values.
Fix a regression introduced in e2fsprogs v1.42 which caused e2image -s
to crash.
Add safety check so tune2fs will not attempt to set the inode size to
be larger than the block size.
Fix e2fsck so it can check a read-only root file system with an
external journal. (Addresses Debian Bug: #707030
Fix off-line resizing of file systems with flex_bg && !resize_inode
(Addresses Debian Bug: #696746)
Fix e2image with large (> 32-bit) file systems (Addresses Debian Bug:
#703067)
Enhance chattr to allow clearing the extent flag if the kernel allows
migrating extent based files to use indirect blocks.
Update German translation.
Updated/fixed various man pages. (Addresses Debian Bugs: #712429,
#712430, #707609)
Fixed various Debian Packaging Issues (Addresses Debian Bug #708307)
Programmer's Notes
------------------
Use secure_getenv() in preference to __secure_getenv().
Optimize CPU utilization of ext2fs_bg_has_super().
Fix ext2fs_llseek() on 32-bit i386 systems to work correctly when
SEEK_CUR is used with large files.
The ext2fs_read_inode_full() function will no longer use
fs->read_inode() if the caller has requested more than the base 128
byte inode structure and the inode size is greater than 128 bytes.
Fix build failure with --enable-jbd-debug.
Clean up filtering of outputs for the regression tests by using a
common sed script.
Fix gcc -Wall and clang nits.
E2fsprogs 1.42.7 (January 21, 2013)
===================================

24
configure vendored
View File

@ -842,6 +842,7 @@ enable_testio_debug
enable_libuuid
enable_libblkid
enable_quota
enable_backtrace
enable_debugfs
enable_imager
enable_resizer
@ -1500,6 +1501,7 @@ Optional Features:
--disable-libuuid do not build private uuid library
--disable-libblkid do not build private blkid library
--enable-quota enable quota support
--disable-backtrace disable use backtrace
--disable-debugfs disable support of debugfs program
--disable-imager disable support of e2image program
--disable-resizer disable support of e2resize program
@ -5338,6 +5340,26 @@ DEPPROFILED_LIBQUOTA=$PROFILED_LIBQUOTA
# Check whether --enable-backtrace was given.
if test "${enable_backtrace+set}" = set; then :
enableval=$enable_backtrace; if test "$enableval" = "no"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling use of backtrace" >&5
$as_echo "Disabling use of backtrace" >&6; }
$as_echo "#define DISABLE_BACKTRACE 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling use of backtrace" >&5
$as_echo "Enabling use of backtrace" >&6; }
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling use of backtrace by default" >&5
$as_echo "Enabling use of backtrace by default" >&6; }
fi
# Check whether --enable-debugfs was given.
if test "${enable_debugfs+set}" = set; then :
enableval=$enable_debugfs; if test "$enableval" = "no"
@ -11087,7 +11109,7 @@ if test "$ac_res" != no; then :
fi
fi
for ac_func in __secure_getenv backtrace blkid_probe_get_topology chflags fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llseek lseek64 mallinfo mbstowcs memalign mmap msync nanosleep open64 pathconf posix_fadvise posix_memalign prctl setmntent setresgid setresuid srandom strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc
for ac_func in __secure_getenv backtrace blkid_probe_get_topology chflags fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llseek lseek64 mallinfo mbstowcs memalign mmap msync nanosleep open64 pathconf posix_fadvise posix_memalign prctl secure_getenv setmntent setresgid setresuid srandom strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"

View File

@ -596,6 +596,22 @@ AC_SUBST(PROFILED_LIBQUOTA)
AC_SUBST(DEPPROFILED_LIBQUOTA)
AC_SUBST(QUOTA_CMT)
dnl
dnl handle --disable-backtrace
dnl
AH_TEMPLATE([DISABLE_BACKTRACE], [Define to 1 to disable use of backtrace])
AC_ARG_ENABLE([backtrace],
[ --disable-backtrace disable use backtrace],
if test "$enableval" = "no"
then
AC_MSG_RESULT([Disabling use of backtrace])
AC_DEFINE(DISABLE_BACKTRACE, 1)
else
AC_MSG_RESULT([Enabling use of backtrace])
fi
,
AC_MSG_RESULT([Enabling use of backtrace by default])
)
dnl
dnl handle --enable-debugfs
dnl
AC_ARG_ENABLE([debugfs],
@ -1079,6 +1095,7 @@ AC_CHECK_FUNCS(m4_flatten([
posix_fadvise
posix_memalign
prctl
secure_getenv
setmntent
setresgid
setresuid

33
debian/changelog vendored
View File

@ -1,3 +1,36 @@
e2fsprogs (1.42.8-1) unstable; urgency=low
* New upstream version
* Work around Debian Bug #712530 (Closes: #708307)
* Fix e2fsck so it can check a read-only root file system with an
external journal. (Closes: #707030)
* Fix off-line resizing of file systems with flex_bg && !resize_inode
(Closes: #696746)
* Change mke2fs so that it does not set the root directory to the real
uid/gid of the mke2fs process. Add the extended option root_owner to
override this behavior.
* E2fsck will now detect and repair corrupted extent trees which contain
invalid extents at the end of the extent tree leaf block.
* E2fsck will now longer complain about zero length extended attribute values.
* Fix a regression introduced in e2fsprogs v1.42 which caused e2image -s
to crash.
* Add safety check so tune2fs will not attempt to set the inode size to
be larger than the block size.
* Enhance chattr to allow clearing the extent flag if the kernel allows it
* Fix e2image with large (> 32-bit) file systems (Closes: #703067)
* Mke2fs will not give warnings about the bigalloc and quota options in
quiet mode.
* Debugfs was erroneously giving spurious error messages for certain
extent_inode subcommands which take arguments (split_node,
replace_node, and insert_node). This has been fixed.
* Fix the parsing of the 's' (sectors) in parse_num_blocks2, which among
other programs is used by mke2fs.
* Fix texinfo incompatibilities (Closes: #712365)
* Updated/fixed various man pages (Closes: #712429, #712430, #707609)
* Update German translation
-- Theodore Y. Ts'o <tytso@mit.edu> Sun, 16 Jun 2013 18:08:15 -0500
e2fsprogs (1.42.7-1) unstable; urgency=low
* New upstream version

2
debian/control.in vendored
View File

@ -10,7 +10,7 @@ Section: admin
Priority: required
Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
Build-Depends: texi2html (>= 1.76), gettext, texinfo, pkg-config, DIETLIBC_DEFINES gcc-multilib [mips mipsel], debhelper (>= 7.0), UTIL_LINUX_NG_DEFINES m4
Standards-Version: 3.9.3
Standards-Version: 3.9.4
Homepage: http://e2fsprogs.sourceforge.net
ifdef(`E2FSCK_STATIC',``

4
debian/rules vendored
View File

@ -171,7 +171,9 @@ else
USRLIB ?= /usr/lib
endif
STD_CONF_FLAGS ?= --enable-symlink-install $(MULTIARCH_CONF)
BACKTRACE_CONF_FLAGS ?= $(shell if ${debdir}/scripts/test-backtrace ; then echo --disable-backtrace ; fi)
STD_CONF_FLAGS ?= --enable-symlink-install $(MULTIARCH_CONF) $(BACKTRACE_CONF_FLAGS)
BF_CONF_FLAGS ?= --disable-nls --disable-imager --disable-testio-debug \
--disable-uuidd --disable-tls --disable-debugfs

34
debian/scripts/test-backtrace vendored Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh
#
# Test to see if backtrace requires a library in /usr/lib
# Returns true if the backtrace command works and requires a library in /usr/lib
# This is a nasty workaround for Debian bug #708307, which is really a glibc bug
#
cat > /tmp/backtrace$$.c << EOF
#include <execinfo.h>
int main(int argc, char **argv)
{
void *stack_syms[32];
int frames;
frames = backtrace(stack_syms, 32);
backtrace_symbols_fd(stack_syms, frames, 0);
}
EOF
if ! cc -o /tmp/backtrace$$ /tmp/backtrace$$.c; then
exit 1
fi
if ! ldd /tmp/backtrace$$ > /tmp/backtrace$$.ldd 2>&1 ; then
exit 1
fi
grep -q /usr/lib /tmp/backtrace$$.ldd
ret=$?
/bin/rm -f /tmp/backtrace$$*
exit $ret

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename libext2fs.info
@settitle The EXT2FS Library (version 1.42.7)
@settitle The EXT2FS Library (version 1.42.8)
@synindex tp fn
@comment %**end of header
@ -60,8 +60,8 @@ by the author.
@title The EXT2FS Library
@subtitle The EXT2FS Library
@subtitle Version 1.42.7
@subtitle January 2013
@subtitle Version 1.42.8
@subtitle June 2013
@author by Theodore Ts'o
@ -102,7 +102,7 @@ by the Foundation.
@top The EXT2FS Library
This manual documents the EXT2FS Library, version 1.42.7.
This manual documents the EXT2FS Library, version 1.42.8.
@menu
* Introduction to the EXT2FS Library::

View File

@ -132,7 +132,8 @@ e2fsck.profiled: $(OBJS) $(PROFILED_DEPLIBS)
$(Q) $(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \
$(PROFILED_LIBS)
tst_sigcatcher: $(srcdir)/sigcatcher.c
tst_sigcatcher: $(srcdir)/sigcatcher.c sigcatcher.o
$(E) " CC $@"
$(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) $(RDYNAMIC) \
$(srcdir)/sigcatcher.c -DDEBUG -o tst_sigcatcher

View File

@ -373,7 +373,7 @@ static void die_signal_handler(int signum, siginfo_t *siginfo,
fprintf(stderr, "fault addr=%p", siginfo->si_addr);
fprintf(stderr, "\n");
#ifdef HAVE_BACKTRACE
#if defined(HAVE_BACKTRACE) && !defined(DISABLE_BACKTRACE)
frames = backtrace(stack_syms, 32);
backtrace_symbols_fd(stack_syms, frames, 2);
#endif

View File

@ -1,16 +1,16 @@
Begin3
Title: EXT2 Filesystem utilities
Version: 1.42.7
Entered-date: 21Jan2013
Version: 1.42.8
Entered-date: 16Jun2013
Description: The filesystem utilities for the EXT2, EXT3, and EXT4
filesystems, including e2fsck, mke2fs, dumpe2fs, and others.
Keywords: utilities, filesystem, Ext2fs, ext3, ext4
Author: tytso@mit.edu (Theodore Tso)
Maintained-by: tytso@mit.edu (Theodore Tso)
Primary-site: download.sourceforge.net /pub/sourceforge/e2fsprogs
5844kB e2fsprogs-1.42.7.tar.gz
560kB e2fsprogs-libs-1.42.7.tar.gz
1kB e2fsprogs-1.42.7.lsm
5852kB e2fsprogs-1.42.8.tar.gz
564kB e2fsprogs-libs-1.42.8.tar.gz
1kB e2fsprogs-1.42.8.lsm
Alternate-site:
Platforms: linux 1.2.x/1.3.x/2.0.x/2.1.x/2.2.x/2.3.x/2.4.x/2.5.x/2.6.x/3.x
Copying-policy: GPL-2/LGPL-2

View File

@ -11,6 +11,9 @@
*/
#include "config.h"
#if HAVE_SECURE_GETENV
#define _GNU_SOURCE
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
@ -49,7 +52,9 @@ static char *safe_getenv(const char *arg)
#endif
#endif
#ifdef HAVE___SECURE_GETENV
#if defined(HAVE_SECURE_GETENV)
return secure_getenv(arg);
#elif defined(HAVE___SECURE_GETENV)
return __secure_getenv(arg);
#else
return getenv(arg);

View File

@ -29,6 +29,9 @@
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
/* Define to 1 to disable use of backtrace */
#undef DISABLE_BACKTRACE
/* Define to 1 to enable bitmap stats. */
#undef ENABLE_BMAP_STATS
@ -305,6 +308,9 @@
/* Define to 1 if if struct sockaddr contains sa_len */
#undef HAVE_SA_LEN
/* Define to 1 if you have the `secure_getenv' function. */
#undef HAVE_SECURE_GETENV
/* Define to 1 if you have the <semaphore.h> header file. */
#undef HAVE_SEMAPHORE_H

View File

@ -17,6 +17,9 @@
*/
#include "config.h"
#if HAVE_SECURE_GETENV
#define _GNU_SOURCE
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -209,7 +212,9 @@ static char *safe_getenv(const char *arg)
#endif
#endif
#ifdef HAVE___SECURE_GETENV
#if defined(HAVE_SECURE_GETENV)
return secure_getenv(arg);
#elif defined(HAVE___SECURE_GETENV)
return __secure_getenv(arg);
#else
return getenv(arg);

View File

@ -20,12 +20,12 @@
#include "ext2_fs.h"
#include "ext2fsP.h"
static int test_root(int a, int b)
static int test_root(unsigned int a, unsigned int b)
{
if (a == 0)
return 1;
while (1) {
if (a == 1)
if (a < b)
return 0;
if (a == b)
return 1;
if (a % b)
return 0;
@ -33,14 +33,15 @@ static int test_root(int a, int b)
}
}
int ext2fs_bg_has_super(ext2_filsys fs, int group_block)
int ext2fs_bg_has_super(ext2_filsys fs, dgrp_t group)
{
if (!(fs->super->s_feature_ro_compat &
EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER))
EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) || group <= 1)
return 1;
if (test_root(group_block, 3) || (test_root(group_block, 5)) ||
test_root(group_block, 7))
if (!(group & 1))
return 0;
if (test_root(group, 3) || (test_root(group, 5)) ||
test_root(group, 7))
return 1;
return 0;

View File

@ -929,7 +929,7 @@ extern errcode_t ext2fs_close(ext2_filsys fs);
extern errcode_t ext2fs_close2(ext2_filsys fs, int flags);
extern errcode_t ext2fs_flush(ext2_filsys fs);
extern errcode_t ext2fs_flush2(ext2_filsys fs, int flags);
extern int ext2fs_bg_has_super(ext2_filsys fs, int group_block);
extern int ext2fs_bg_has_super(ext2_filsys fs, dgrp_t group_block);
extern errcode_t ext2fs_super_and_bgd_loc2(ext2_filsys fs,
dgrp_t group,
blk64_t *ret_super_blk,

View File

@ -1,79 +0,0 @@
/*
* sparse.c --- find the groups in an ext2 filesystem with metadata backups
*
* Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
* Copyright (C) 2002 Andreas Dilger.
*
* %Begin-Header%
* This file may be redistributed under the terms of the GNU Library
* General Public License, version 2.
* %End-Header%
*/
#include "config.h"
#include <stdio.h>
#include "ext2_fs.h"
#include "ext2fsP.h"
static int test_root(int a, int b)
{
if (a == 0)
return 1;
while (1) {
if (a == 1)
return 1;
if (a % b)
return 0;
a = a / b;
}
}
int ext2fs_bg_has_super(ext2_filsys fs, int group_block)
{
if (!(fs->super->s_feature_ro_compat &
EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER))
return 1;
if (test_root(group_block, 3) || (test_root(group_block, 5)) ||
test_root(group_block, 7))
return 1;
return 0;
}
/*
* Iterate through the groups which hold BACKUP superblock/GDT copies in an
* ext3 filesystem. The counters should be initialized to 1, 5, and 7 before
* calling this for the first time. In a sparse filesystem it will be the
* sequence of powers of 3, 5, and 7: 1, 3, 5, 7, 9, 25, 27, 49, 81, ...
* For a non-sparse filesystem it will be every group: 1, 2, 3, 4, ...
*/
unsigned int ext2fs_list_backups(ext2_filsys fs, unsigned int *three,
unsigned int *five, unsigned int *seven)
{
unsigned int *min = three;
int mult = 3;
unsigned int ret;
if (!(fs->super->s_feature_ro_compat &
EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) {
ret = *min;
*min += 1;
return ret;
}
if (*five < *min) {
min = five;
mult = 5;
}
if (*seven < *min) {
min = seven;
mult = 7;
}
ret = *min;
*min *= mult;
return ret;
}

View File

@ -10,6 +10,12 @@
*/
#include "config.h"
#if HAVE_SECURE_GETENV
#define _GNU_SOURCE
#endif
#if HAVE_SECURE_GETENV
#define _GNU_SOURCE
#endif
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
@ -173,7 +179,9 @@ static char *safe_getenv(const char *arg)
#endif
#endif
#ifdef HAVE___SECURE_GETENV
#if defined(HAVE_SECURE_GETENV)
return secure_getenv(arg);
#elif defined(HAVE___SECURE_GETENV)
return __secure_getenv(arg);
#else
return getenv(arg);

View File

@ -15,6 +15,9 @@
*/
#include "config.h"
#if HAVE_SECURE_GETENV
#define _GNU_SOURCE
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@ -56,7 +59,9 @@ char *ss_safe_getenv(const char *arg)
#endif
#endif
#ifdef HAVE___SECURE_GETENV
#if defined(HAVE_SECURE_GETENV)
return secure_getenv(arg);
#elif defined(HAVE___SECURE_GETENV)
return __secure_getenv(arg);
#else
return getenv(arg);

View File

@ -1171,7 +1171,7 @@ static void install_image(char *device, char *image_fn, int type)
{
errcode_t retval;
ext2_filsys fs;
int open_flag = EXT2_FLAG_IMAGE_FILE;
int open_flag = EXT2_FLAG_IMAGE_FILE | EXT2_FLAG_64BITS;
int fd = 0;
io_manager io_ptr;
io_channel io;

View File

@ -268,6 +268,15 @@ small risk if the system crashes before the journal has been overwritten
entirely one time. If the option value is omitted, it defaults to 1 to
enable lazy journal inode zeroing.
.TP
.BI root_owner [=uid:gid]
Specify the numeric user and group ID of the root directory. If no UID:GID
is specified, use the user and group ID of the user running \fBmke2fs\fR.
In \fBmke2fs\fR 1.42 and earlier the UID and GID of the root directory were
set by default to the UID and GID of the user running the mke2fs command.
The \fBroot_owner=\fR option allows explicitly specifying these values,
and avoid side-effects for users that do not expect the contents of the
filesystem to change based on the user running \fBmke2fs\fR.
.TP
.B test_fs
Set a flag in the filesystem superblock indicating that it may be
mounted using experimental kernel code, such as the ext4dev filesystem.
@ -649,12 +658,12 @@ If this option is not specified,
will pick a default either via how
the command was run (for example, using a name of the form mkfs.ext2,
mkfs.ext3, etc.) or via a default as defined by the
.BR /etc/mke2fs.conf (5)
.B /etc/mke2fs.conf
file. This option controls which filesystem options are used by
default, based on the
.B fstypes
configuration stanza in
.BR /etc/mke2fs.conf (5).
.BR /etc/mke2fs.conf .
.sp
If the
.B \-O
@ -673,7 +682,7 @@ Specify how the filesystem is going to be used, so that
.B mke2fs
can choose optimal filesystem parameters for that use. The usage
types that are supported are defined in the configuration file
.BR /etc/mke2fs.conf (5).
.BR /etc/mke2fs.conf .
The user may specify one or more usage types
using a comma separated list.
.sp

View File

@ -88,6 +88,8 @@ int discard = 1; /* attempt to discard device before fs creation */
int direct_io;
int force;
int noaction;
uid_t root_uid;
gid_t root_gid;
int journal_size;
int journal_flags;
int lazy_itable_init;
@ -391,21 +393,19 @@ static void create_root_dir(ext2_filsys fs)
com_err("ext2fs_mkdir", retval, _("while creating root dir"));
exit(1);
}
if (geteuid()) {
if (root_uid != 0 || root_gid != 0) {
retval = ext2fs_read_inode(fs, EXT2_ROOT_INO, &inode);
if (retval) {
com_err("ext2fs_read_inode", retval,
_("while reading root inode"));
exit(1);
}
uid = getuid();
inode.i_uid = uid;
ext2fs_set_i_uid_high(inode, uid >> 16);
if (uid) {
gid = getgid();
inode.i_gid = gid;
ext2fs_set_i_gid_high(inode, gid >> 16);
}
inode.i_uid = root_uid;
ext2fs_set_i_uid_high(inode, root_uid >> 16);
inode.i_gid = root_gid;
ext2fs_set_i_gid_high(inode, root_gid >> 16);
retval = ext2fs_write_new_inode(fs, EXT2_ROOT_INO, &inode);
if (retval) {
com_err("ext2fs_write_inode", retval,
@ -612,6 +612,8 @@ static void show_stats(ext2_filsys fs)
ext2fs_r_blocks_count(s),
100.0 * ext2fs_r_blocks_count(s) / ext2fs_blocks_count(s));
printf(_("First data block=%u\n"), s->s_first_data_block);
if (root_uid != 0 || root_gid != 0)
printf(_("Root directory owner=%u:%u\n"), root_uid, root_gid);
if (s->s_reserved_gdt_blocks)
printf(_("Maximum filesystem blocks=%lu\n"),
(s->s_reserved_gdt_blocks + fs->desc_blocks) *
@ -835,6 +837,29 @@ static void parse_extended_opts(struct ext2_super_block *param,
EXT2_MKJOURNAL_LAZYINIT : 0;
else
journal_flags |= EXT2_MKJOURNAL_LAZYINIT;
} else if (!strcmp(token, "root_owner")) {
if (arg) {
root_uid = strtoul(arg, &p, 0);
if (*p != ':') {
fprintf(stderr,
_("Invalid root_owner: '%s'\n"),
arg);
r_usage++;
continue;
}
p++;
root_gid = strtoul(p, &p, 0);
if (*p) {
fprintf(stderr,
_("Invalid root_owner: '%s'\n"),
arg);
r_usage++;
continue;
}
} else {
root_uid = getuid();
root_gid = getgid();
}
} else if (!strcmp(token, "discard")) {
discard = 1;
} else if (!strcmp(token, "nodiscard")) {
@ -872,6 +897,8 @@ static void parse_extended_opts(struct ext2_super_block *param,
"\tresize=<resize maximum size in blocks>\n"
"\tlazy_itable_init=<0 to disable, 1 to enable>\n"
"\tlazy_journal_init=<0 to disable, 1 to enable>\n"
"\troot_uid=<uid of root directory>\n"
"\troot_gid=<gid of root directory>\n"
"\ttest_fs\n"
"\tdiscard\n"
"\tnodiscard\n"
@ -1395,6 +1422,16 @@ profile_error:
case 'D':
direct_io = 1;
break;
case 'R':
com_err(program_name, 0,
_("'-R' is deprecated, use '-E' instead"));
/* fallthrough */
case 'E':
extended_opts = optarg;
break;
case 'F':
force++;
break;
case 'g':
fs_param.s_blocks_per_group = strtoul(optarg, &tmp, 0);
if (*tmp) {
@ -1434,6 +1471,18 @@ profile_error:
exit(1);
}
break;
case 'I':
inode_size = strtoul(optarg, &tmp, 0);
if (*tmp) {
com_err(program_name, 0,
_("invalid inode size - %s"), optarg);
exit(1);
}
break;
case 'j':
if (!journal_size)
journal_size = -1;
break;
case 'J':
parse_journal_opts(optarg);
break;
@ -1444,10 +1493,6 @@ profile_error:
"instead!\n"));
discard = 0;
break;
case 'j':
if (!journal_size)
journal_size = -1;
break;
case 'l':
bad_blocks_filename = malloc(strlen(optarg)+1);
if (!bad_blocks_filename) {
@ -1457,6 +1502,9 @@ profile_error:
}
strcpy(bad_blocks_filename, optarg);
break;
case 'L':
volume_label = optarg;
break;
case 'm':
reserved_ratio = strtod(optarg, &tmp);
if ( *tmp || reserved_ratio > 50 ||
@ -1467,12 +1515,26 @@ profile_error:
exit(1);
}
break;
case 'M':
mount_dir = optarg;
break;
case 'n':
noaction++;
break;
case 'N':
num_inodes = strtoul(optarg, &tmp, 0);
if (*tmp) {
com_err(program_name, 0,
_("bad num inodes - %s"), optarg);
exit(1);
}
break;
case 'o':
creator_os = optarg;
break;
case 'O':
fs_features = optarg;
break;
case 'q':
quiet = 1;
break;
@ -1488,41 +1550,6 @@ profile_error:
case 's': /* deprecated */
s_opt = atoi(optarg);
break;
case 'I':
inode_size = strtoul(optarg, &tmp, 0);
if (*tmp) {
com_err(program_name, 0,
_("invalid inode size - %s"), optarg);
exit(1);
}
break;
case 'v':
verbose = 1;
break;
case 'F':
force++;
break;
case 'L':
volume_label = optarg;
break;
case 'M':
mount_dir = optarg;
break;
case 'N':
num_inodes = strtoul(optarg, &tmp, 0);
if (*tmp) {
com_err(program_name, 0,
_("bad num inodes - %s"), optarg);
exit(1);
}
break;
case 'O':
fs_features = optarg;
break;
case 'E':
case 'R':
extended_opts = optarg;
break;
case 'S':
super_only = 1;
break;
@ -1545,6 +1572,9 @@ profile_error:
case 'U':
fs_uuid = optarg;
break;
case 'v':
verbose = 1;
break;
case 'V':
/* Print version number and exit */
show_version_only++;

View File

@ -11,7 +11,7 @@ is the configuration file for
.BR mke2fs (8).
It controls the default parameters used by
.BR mke2fs (8)
when it is creating ext2 or ext3 filesystems.
when it is creating ext2, ext3, or ext4 filesystems.
.PP
The
.I mke2fs.conf

File diff suppressed because it is too large Load Diff

View File

@ -24,19 +24,19 @@ echo "debugfs -R ''write $TEST_DATA test_data'' -w test.img" > $OUT.new
$DEBUGFS -R "write $TEST_DATA test_data" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
echo "debugfs -R ''dump test_data $VERIFY_DATA'' test.img" > $OUT.new
$DEBUGFS -R "dump test_data $VERIFY_DATA" $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
echo "cmp $TEST_DATA $VERIFY_DATA" >> $OUT
cmp $TEST_DATA $VERIFY_DATA >>$OUT

View File

@ -33,43 +33,43 @@ echo "debugfs -R ''stat foo'' -w test.img" > $OUT.new
$DEBUGFS -R "stat foo" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
echo "debugfs -R ''stat foo2'' -w test.img" > $OUT.new
$DEBUGFS -R "stat foo2" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
echo "debugfs -R ''block_dump 28'' -w test.img" > $OUT.new
$DEBUGFS -R "block_dump 28" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
echo "debugfs -R ''stat pipe'' -w test.img" > $OUT.new
$DEBUGFS -R "stat pipe" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
echo "debugfs -R ''stat sda'' -w test.img" > $OUT.new
$DEBUGFS -R "stat sda" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
echo "debugfs -R ''stat null'' -w test.img" > $OUT.new
$DEBUGFS -R "stat null" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
#
# Do the verification

View File

@ -1,4 +1,3 @@
Journal starts at block 1, transaction 2
Found expected sequence 2, type 1 (descriptor block) at block 1
Dumping descriptor block, sequence 2, at block 1:

View File

@ -1,4 +1,4 @@
PREP_CMD='$DEBUGFS -R "logdump -a" $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs > $test_name.0.log'
PREP_CMD='$DEBUGFS -R "logdump -a" $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log'
PASS_ZERO=true
. $cmd_dir/run_e2fsck

View File

@ -1,4 +1,3 @@
Journal starts at block 67, transaction 32
Found expected sequence 32, type 5 (revoke table) at block 67
Dumping revoke block, sequence 32, at block 67:

View File

@ -1,4 +1,4 @@
PREP_CMD='$DEBUGFS -R "logdump -a" $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs > $test_name.0.log'
PREP_CMD='$DEBUGFS -R "logdump -a" $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log'
PASS_ZERO=true
. $cmd_dir/run_e2fsck

View File

@ -1,4 +1,3 @@
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -1,4 +1,4 @@
AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs > $test_name.0.log'
AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log'
PASS_ZERO=true
. $cmd_dir/run_e2fsck

View File

@ -1,2 +1,3 @@
test_filesys: Truncating orphaned inode 12 (uid=0, gid=0, mode=0100644, size=0)
test_filesys: clean, 12/16 files, 21/100 blocks
Exit status is 0

View File

@ -1,3 +1,4 @@
test_filesys: Note: if several inode or block bitmap blocks or part
of the inode table require relocation, you may wish to try
running e2fsck with the '-b 8193' option first. The problem
may lie only with the primary block group descriptors, and

View File

@ -15,15 +15,13 @@ cp /dev/null $OUT
dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
echo mke2fs -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384 > $OUT
$MKE2FS -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 \
| sed -e '1d' | grep -v "automatically checked" |
grep -v 'Discarding device blocks' |
grep -v "whichever comes first" >> $OUT
$MKE2FS -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
echo ----------------------------------------------- >> $OUT
@ -33,18 +31,18 @@ echo "debugfs -R ''set_inode_field <7> block[2] 42'' -w test.img" > $OUT.new
$DEBUGFS -R "set_inode_field <7> block[2] 42" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
echo ----------------------------------------------- >> $OUT
@ -54,18 +52,18 @@ echo "debugfs -R ''clri <7>'' -w test.img" > $OUT.new
$DEBUGFS -R "clri <7>" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
echo ----------------------------------------------- >> $OUT
@ -75,18 +73,18 @@ echo "debugfs -R ''set_inode_field <7> bmap[524] 57'' -w test.img" > $OUT.new
$DEBUGFS -R "set_inode_field <7> bmap[524] 57" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
echo ----------------------------------------------- >> $OUT
@ -96,12 +94,12 @@ echo "debugfs -R ''set_super_value reserved_gdt_blocks 15679'' -w test.img" > $O
$DEBUGFS -R "set_super_value reserved_gdt_blocks 15679" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
echo ----------------------------------------------- >> $OUT
@ -111,18 +109,18 @@ echo "debugfs -R ''set_super_value reserved_gdt_blocks 32'' -w test.img" > $OUT.
$DEBUGFS -R "set_super_value reserved_gdt_blocks 32" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '2d' $OUT.new >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new

View File

@ -1,14 +1,19 @@
1s/^.*$//
/^Filesystem UUID:/d
/^[dbgumpe2fsckrsiz]* [1-9]\.[0-9]*[.-][^ ]* ([0-9]*-[A-Za-z]*-[0-9]*)/d
s/\\015//g
/automatically checked/d
/^Directory Hash Seed:/d
/Discarding device blocks/d
/^Filesystem created:/d
/^Filesystem flags:/d
/^Filesystem UUID:/d
/^JFS DEBUG:/d
/^Last write time:/d
/^Last mount time:/d
/^Last checked:/d
/^Directory Hash Seed:/d
/^Next check after:/d
/^Maximum mount count:/d
/^Lifetime writes:/d
/^Maximum mount count:/d
/^Next check after:/d
/Reserved blocks uid:/s/ (user .*)//
/Reserved blocks gid:/s/ (group .*)//
/whichever comes first/d
/^ Checksum /d

View File

@ -1,5 +1,4 @@
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
@ -7,7 +6,6 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/1344 files (0.0% non-contiguous), 1286989/2750000 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -18,7 +18,6 @@ Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
@ -26,7 +25,6 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/16384 files (0.0% non-contiguous), 1104/32768 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -19,7 +19,6 @@ Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent sparse_super
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
@ -27,7 +26,6 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/16384 files (0.0% non-contiguous), 7460/65536 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -16,7 +16,6 @@ Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
@ -24,7 +23,6 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/64 files (0.0% non-contiguous), 17/16384 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -17,7 +17,6 @@ Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: ext_attr dir_index filetype meta_bg sparse_super
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
@ -25,7 +24,6 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32768 files (0.0% non-contiguous), 4389/131072 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -12,8 +12,8 @@ export MKE2FS_SKIP_PROGRESS MKE2FS_SKIP_CHECK_MSG
cp /dev/null $OUT
$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 | sed -e 1d | \
sed -e "s;$TMPFILE;test.img;" | tr -d \\015 > $OUT
$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" > $OUT
rm -f $TMPFILE

View File

@ -19,7 +19,6 @@ Multiple mount protection is enabled with update interval 5 seconds.
Writing superblocks and filesystem accounting information: done
Filesystem features: ext_attr resize_inode dir_index filetype mmp sparse_super large_file
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
@ -27,7 +26,6 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/65536 files (0.0% non-contiguous), 2093/65536 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -17,7 +17,6 @@ Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features:(none)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
@ -25,7 +24,6 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/16384 files (0.0% non-contiguous), 2094/65536 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -18,7 +18,6 @@ Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
@ -26,7 +25,6 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32768 files (0.0% non-contiguous), 7238/131072 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -1,4 +1,4 @@
DESCRIPTION="raid options"
FS_SIZE=131072
MKE2FS_OPTS="-R stride=13 -O sparse_super -g 1024"
MKE2FS_OPTS="-E stride=13 -O sparse_super -g 1024"
. $cmd_dir/run_mke2fs

View File

@ -0,0 +1,65 @@
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
128 inodes, 1024 blocks
51 blocks (4.98%) reserved for the super user
First data block=1
Root directory owner=1234:1234
Maximum filesystem blocks=1048576
1 block group
8192 blocks per group, 8192 fragments per group
128 inodes per group
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/128 files (0.0% non-contiguous), 38/1024 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 128
Block count: 1024
Reserved block count: 51
Free blocks: 986
Free inodes: 117
First block: 1
Block size: 1024
Fragment size: 1024
Reserved GDT blocks: 3
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 128
Inode blocks per group: 16
Mount count: 0
Check interval: 15552000 (6 months)
Reserved blocks uid: 0
Reserved blocks gid: 0
First inode: 11
Inode size: 128
Default directory hash: half_md4
Group 0: (Blocks 1-1023)
Primary superblock at 1, Group descriptors at 2-2
Reserved GDT blocks at 3-5
Block bitmap at 6 (+5), Inode bitmap at 7 (+6)
Inode table at 8-23 (+7)
986 free blocks, 117 free inodes, 2 directories
Free blocks: 38-1023
Free inodes: 12-128

View File

@ -0,0 +1,4 @@
DESCRIPTION="root directory owner"
FS_SIZE=1024
MKE2FS_OPTS="-E root_owner=1234:1234"
. $cmd_dir/run_mke2fs

View File

@ -18,7 +18,6 @@ Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
@ -26,7 +25,6 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/16384 files (0.0% non-contiguous), 3364/65536 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -18,7 +18,6 @@ Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Filesystem features: ext_attr resize_inode dir_index filetype sparse_super uninit_bg
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
@ -26,7 +25,6 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/32768 files (0.0% non-contiguous), 5691/131072 blocks
Exit status is 0
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -20,7 +20,7 @@ echo "resize2fs test.img 5M" >> $OUT
$RESIZE2FS $TMPFILE 5M 2>&1 >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e "s;$TMPFILE;test.img;" >> $OUT
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
# Look at inline extended attribute in resized fs
echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT

View File

@ -13,7 +13,6 @@ Pass 5: Checking group summary information
test_filesys: 11/1248 files (0.0% non-contiguous), 1281/9985 blocks
Exit status is 0
dumpe2fs test.img
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
@ -312,7 +311,6 @@ Pass 5: Checking group summary information
test_filesys: 11/2496 files (0.0% non-contiguous), 1644/19969 blocks
Exit status is 0
dumpe2fs test.img
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
@ -847,7 +845,6 @@ Pass 5: Checking group summary information
test_filesys: 11/3744 files (0.0% non-contiguous), 2007/29953 blocks
Exit status is 0
dumpe2fs test.img
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
@ -1618,7 +1615,6 @@ Pass 5: Checking group summary information
test_filesys: 11/5024 files (0.0% non-contiguous), 2376/40000 blocks
Exit status is 0
dumpe2fs test.img
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -14,18 +14,17 @@ cp /dev/null $OUT
dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
echo mke2fs -q -F -o Linux -b 1024 -g 256 test.img 1024 > $OUT
$MKE2FS -q -F -o Linux -b 1024 -g 256 $TMPFILE 1024 2>&1 \
| sed -e '1d' | grep -v "automatically checked" |
grep -v "whichever comes first" >> $OUT
$MKE2FS -q -F -o Linux -b 1024 -g 256 $TMPFILE 1024 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
echo resize2fs -p test.img 10000 >> $OUT
$RESIZE2FS -p $TMPFILE 10000 2>&1 | sed -e '1d' | \
sed -e "s;$TMPFILE;test.img;" >> $OUT
$RESIZE2FS -p $TMPFILE 10000 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
@ -34,18 +33,18 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
echo "--------------------------------" >> $OUT
echo resize2fs -p test.img 20000 >> $OUT
$RESIZE2FS -p $TMPFILE 20000 2>&1 | sed -e '1d' | \
sed -e "s;$TMPFILE;test.img;" >> $OUT
$RESIZE2FS -p $TMPFILE 20000 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
@ -54,18 +53,18 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
echo "--------------------------------" >> $OUT
echo resize2fs -p test.img 30000 >> $OUT
$RESIZE2FS -p $TMPFILE 30000 2>&1 | sed -e '1d' | \
sed -e "s;$TMPFILE;test.img;" >> $OUT
$RESIZE2FS -p $TMPFILE 30000 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
@ -74,18 +73,18 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
echo "--------------------------------" >> $OUT
echo resize2fs -p test.img 40000 >> $OUT
$RESIZE2FS -p $TMPFILE 40000 2>&1 | sed -e '1d' | \
sed -e "s;$TMPFILE;test.img;" >> $OUT
$RESIZE2FS -p $TMPFILE 40000 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
@ -94,7 +93,7 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
rm -f $TMPFILE

View File

@ -11,7 +11,6 @@ Pass 5: Checking group summary information
test_filesys: 11/16384 files (0.0% non-contiguous), 4513/65536 blocks
Exit status is 0
dumpe2fs test.img
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
@ -459,7 +458,6 @@ Pass 5: Checking group summary information
test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks
Exit status is 0
dumpe2fs test.img
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
@ -614,7 +612,6 @@ Pass 5: Checking group summary information
test_filesys: 11/41472 files (0.0% non-contiguous), 8361/165536 blocks
Exit status is 0
dumpe2fs test.img
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53

View File

@ -14,18 +14,17 @@ cp /dev/null $OUT
dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
echo mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384 > $OUT
$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 \
| sed -e '1d' | grep -v "automatically checked" |
grep -v "whichever comes first" >> $OUT
$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
echo resize2fs test.img 65536 >> $OUT
$RESIZE2FS $TMPFILE 65536 2>&1 | sed -e '1d' | \
sed -e "s;$TMPFILE;test.img;" >> $OUT
$RESIZE2FS $TMPFILE 65536 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
@ -34,25 +33,24 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
echo "--------------------------------" >> $OUT
dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
echo mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 65536 >> $OUT
$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 65536 2>&1 \
| sed -e '1d' | grep -v "automatically checked" |
grep -v "whichever comes first" >> $OUT
$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 65536 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
echo resize2fs test.img 16384 >> $OUT
$RESIZE2FS $TMPFILE 16384 2>&1 | sed -e '1d' | \
sed -e "s;$TMPFILE;test.img;" >> $OUT
$RESIZE2FS $TMPFILE 16384 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
@ -61,18 +59,18 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
echo "--------------------------------" >> $OUT
echo resize2fs test.img 165536 >> $OUT
$RESIZE2FS $TMPFILE 165536 2>&1 | sed -e '1d' | \
sed -e "s;$TMPFILE;test.img;" >> $OUT
$RESIZE2FS $TMPFILE 165536 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
@ -81,7 +79,7 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
rm -f $TMPFILE
cmp -s $OUT $EXP

View File

@ -50,16 +50,14 @@ eval $PREP_CMD
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT1.new 2>&1
status=$?
echo Exit status is $status >> $OUT1.new
sed -e '1d' $OUT1.new | sed -e '/^JFS DEBUG:/d' | \
sed -e "s;$TMPFILE;test.img;" | tr -d \\015 >> $OUT1
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT1.new >> $OUT1
rm -f $OUT1.new
if [ "$ONE_PASS_ONLY" != "true" ]; then
$FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1
status=$?
echo Exit status is $status >> $OUT2.new
sed -e '1d' $OUT2.new | sed -e '/^JFS DEBUG:/d' | \
sed -e "s;$TMPFILE;test.img;" > $OUT2
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT2.new > $OUT2
rm -f $OUT2.new
fi

View File

@ -11,8 +11,11 @@ MKE2FS_SKIP_PROGRESS=true
MKE2FS_SKIP_CHECK_MSG=true
export MKE2FS_SKIP_PROGRESS MKE2FS_SKIP_CHECK_MSG
> $TMPFILE
PREP_CMD='$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 | sed -e 1d | grep -v "Discarding device blocks" | tr -d \\015 > $OUT1 ; $DEBUGFS -R features $TMPFILE 2>&1 | sed -e 1d | tr -d \\015 >> $OUT1 ; echo " " >> $OUT1'
AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs | tr -d \\015 >> $OUT1'
PREP_CMD='$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" > $OUT1;
$DEBUGFS -R features $TMPFILE 2>&1 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT1'
AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT1'
. $cmd_dir/run_e2fsck
else #if test -x $DEBUGFS_EXE; then

View File

@ -8,4 +8,5 @@
*/
#define E2FSPROGS_VERSION "1.43-WIP"
#define E2FSPROGS_DATE "21-Jan-2013"
#define E2FSPROGS_DATE "16-Jun-2013"