summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1997-04-29 15:29:49 +0000
committerTheodore Ts'o <tytso@mit.edu>1997-04-29 15:29:49 +0000
commit5c576477ccb2f0ca8c5d5af2e2354fd8eeff1589 (patch)
tree23bf89a13feb18647bdd81622c9f900634093eac
parentef423288716bf9662b952eb5e694a54a5b077240 (diff)
downloade2fsprogs-5c576477ccb2f0ca8c5d5af2e2354fd8eeff1589.tar.gz
Many files:
Checked in e2fsprogs 1.06
-rw-r--r--ChangeLog10
-rw-r--r--INSTALL12
-rw-r--r--Makefile.in2
-rw-r--r--RELEASE-NOTES52
-rw-r--r--debugfs/ChangeLog4
-rw-r--r--e2fsck/ChangeLog36
-rw-r--r--e2fsck/e2fsck.8.in2
-rw-r--r--e2fsck/e2fsck.c36
-rw-r--r--e2fsck/pass1.c8
-rw-r--r--e2fsck/pass4.c76
-rw-r--r--e2fsck/swapfs.c22
-rw-r--r--e2fsck/util.c3
-rw-r--r--e2fsprogs-1.06.spec (renamed from e2fsprogs-1.05.spec)4
-rw-r--r--include/linux/ChangeLog4
-rw-r--r--install-utils/ChangeLog4
-rw-r--r--lib/ChangeLog3
-rw-r--r--lib/e2p/ChangeLog8
-rw-r--r--lib/e2p/pf.c9
-rw-r--r--lib/et/ChangeLog4
-rw-r--r--lib/ext2fs/ChangeLog27
-rw-r--r--lib/ext2fs/bitmaps.c2
-rw-r--r--lib/ext2fs/block.c37
-rw-r--r--lib/ext2fs/closefs.c12
-rw-r--r--lib/ext2fs/dirblock.c7
-rw-r--r--lib/ext2fs/ext2fs.h7
-rw-r--r--lib/ext2fs/initialize.c2
-rw-r--r--lib/ext2fs/inode.c16
-rw-r--r--lib/ext2fs/native.c2
-rw-r--r--lib/ext2fs/openfs.c6
-rw-r--r--lib/ss/ChangeLog4
-rw-r--r--lib/ss/test_ss.c4
-rw-r--r--lib/uuid/ChangeLog4
-rw-r--r--misc/ChangeLog15
-rw-r--r--misc/chattr.1.in7
-rw-r--r--misc/chattr.c16
-rw-r--r--misc/dumpe2fs.8.in13
-rw-r--r--misc/dumpe2fs.c13
-rw-r--r--tests/ChangeLog17
-rw-r--r--tests/f_expand/expect.166
-rw-r--r--tests/f_expand/expect.22
-rw-r--r--tests/f_expand/image.gzbin13125 -> 1607 bytes
-rw-r--r--tests/f_mke2fs2b/expect.114
-rw-r--r--tests/f_mke2fs2b/expect.22
-rw-r--r--tests/f_noroot/expect.114
-rw-r--r--tests/f_noroot/expect.22
-rw-r--r--tests/f_preen/expect.112
-rw-r--r--tests/f_preen/expect.218
-rw-r--r--tests/f_preen/image.gzbin0 -> 155743 bytes
-rw-r--r--tests/f_preen/name1
-rw-r--r--tests/f_preen/script4
-rw-r--r--tests/test_config6
-rw-r--r--tests/test_script.in7
-rw-r--r--version.h4
53 files changed, 524 insertions, 138 deletions
diff --git a/ChangeLog b/ChangeLog
index 4694ae32..face968a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Mon Oct 7 08:22:31 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Makefile.in (all): Don't run "make check" by default. User
+ should manually run "make check" if they wish to test
+ things out.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Sat Aug 31 10:55:45 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* configure.in (AC_CHECK_FUNCS): Add fchown to list of functions
diff --git a/INSTALL b/INSTALL
index a6feeb3f..0c3d4637 100644
--- a/INSTALL
+++ b/INSTALL
@@ -20,11 +20,15 @@ profiling libraries, add the option --enable-profile.
make
-5) Install the programs
+5) Check to make sure the installation built correctly:
+
+ make check
+
+6) Install the programs
Run `make install'
-6) Install the include files and libraries
+7) Install the include files and libraries
You can run `make install-libs' to install the include files and
libraries. Please note that this installation is not needed for the
@@ -32,7 +36,7 @@ programs to work. It is only needed if you expect to develop other
programs using the libraries or if you want to compile other program
using these libraries (like the 4.4BSD dump and restore port).
-7) Remove any pre-formatted man pages.
+8) Remove any pre-formatted man pages.
Some distributions will have pre-formatted manual pages which
will always be displayed in preference to newer man pages in /usr/man.
@@ -40,7 +44,7 @@ If this is the case, you may need to manually remove them in order to
see the correct manual pages. The shell script in
install-utils/remove_preformat_manpages may be helpful in doing so.
-8) Make sure your /etc/fstab file is correct.
+9) Make sure your /etc/fstab file is correct.
Some distributions install an /etc/fstab which is missing the
fifth and sixth field of filesystem entry, which are the dump
diff --git a/Makefile.in b/Makefile.in
index 1d78c637..ad96438c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -13,7 +13,7 @@ SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
SUBS= include/linux/types.h
-all:: $(SUBS) libs progs check
+all:: $(SUBS) libs progs
progs: $(SUBS) all-progs-recursive
libs: $(SUBS) all-libs-recursive
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 1fa079f7..511cd632 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,55 @@
+
+E2fsprogs 1.06 (October 7, 1996)
+================================
+
+Fixed serious bug in e2fsck: if the block descriptors are bad, don't
+smash the backup copies in ext2fs_close(). (The problem was that when
+e2fsck -p discovered the problem, while it was closing the filesystem
+and exiting, it was also blowing away the backup superblocks on the
+disk, which was less than friendly.) We now make it the case that we
+only write out the backup superblock and the back block descriptors if
+the filesystem is completely free from problems.
+
+Fixed a bug in block_interate in the lib/ext2fs library which caused
+e2fsck to fail on GNU Hurd-created filesystems.
+
+Add support for Linux/FT's bootloader, which actually uses
+EXT2_BOOT_LOADER, and sets its mode bits which caused e2fsck to want
+to clear the inode.
+
+Add support for the "A" (no atime update) attribute. (Note: this
+attribute is not yet in production kernels.)
+
+The test suite is not automatically run when doing a "make all" from
+the top level directory. Users should manually run "make check" if
+they wish to run the test suite.
+
+Upon a preenhalt(), make the printed message more explicit that
+running e2fsck "MANAULLY" means without the -p or -a options.
+
+In e2fsck, if a disconnected inode is zero-length, offer to clear it
+instead of offering to connect it to lost+found.
+
+In e2fsck, if a filesystem was just unmounted uncleanly, and needs
+e2fsck to be run over it, change e2fsck to explicitly display this
+fact.
+
+For dumpe2fs and e2fsck, cause the -V option to print out which
+version of the ext2fs library is actually getting used. (This will
+help detect mismatches of using a 1.06 utility with a 1.05 library,
+etc.)
+
+Programmers' notes:
+-------------------
+
+EXT2_SWAP_BYTES was changed to EXT2_FLAG_SWAP_BYTES, which better fits
+the naming convention.
+
+In ext2fs_initialize(), make sure the description for the inode bitmap
+is correctly initialize.
+
+Fixed minor type typo in ext2fs_allocate_generic_bitmap();
+
E2fsprogs 1.05 (September 7, 1996)
==================================
diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog
index a1b41256..74cf8404 100644
--- a/debugfs/ChangeLog
+++ b/debugfs/ChangeLog
@@ -1,3 +1,7 @@
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Mon Sep 9 23:05:11 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* debugfs.c (unlink_file_by_name): If unlinking a file with a
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index fcab1e68..f69dc083 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -1,3 +1,39 @@
+Mon Oct 7 00:45:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * e2fsck.c (main): Print out the version number of the shared
+ library when using the -V option.
+
+ * swapfs.c (swap_filesys): Change EXT2_SWAP to EXT2_FLAG_SWAP for
+ consistency's sake.
+
+ * e2fsck.c (main): By setting EXT2_FLAG_MASTER_SB_ONLY, only write
+ out the backup superblocks when we know we have a valid
+ filesystem.
+
+Tue Oct 1 22:00:29 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * util.c (preenhalt): Make it explicit on preenhalt that running
+ e2fsck manually means without the -a or -p flag.
+
+Fri Sep 27 14:41:08 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * pass1.c (pass1): Add support for the EXT2_BOOT_LOADER inode.
+ (Linux/FT actually sets the mode bits, so we have to
+ handle it specially.)
+
+ * e2fsck.c (check_if_skip): Print a message if the filesystem is
+ just dirty, so that the user knows that it's about to be
+ checked (since this will take a while).
+
+Mon Sep 16 17:00:01 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * pass4.c: If a disconnected inode is zero-length, prompt to
+ delete it instead of connecting it to lost+found.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Fri Aug 30 20:24:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* pass4.c (pass4): If the user refuses to connect an unattached
diff --git a/e2fsck/e2fsck.8.in b/e2fsck/e2fsck.8.in
index cb715054..7750b189 100644
--- a/e2fsck/e2fsck.8.in
+++ b/e2fsck/e2fsck.8.in
@@ -151,7 +151,7 @@ is the sum of the following conditions:
.br
\ 128\ \-\ Shared library error
.br
-.SH BUGS
+.SH REPORTING BUGS
Almost any piece of software will have bugs. If you manage to find a
filesystem which causes
.B e2fsck
diff --git a/e2fsck/e2fsck.c b/e2fsck/e2fsck.c
index 90482984..f081d668 100644
--- a/e2fsck/e2fsck.c
+++ b/e2fsck/e2fsck.c
@@ -421,19 +421,19 @@ static void check_if_skip(ext2_filsys fs)
time(0) >= (fs->super->s_lastcheck +
fs->super->s_checkinterval))
reason = "has gone too long without being checked";
+ else if ((fs->super->s_state & EXT2_VALID_FS) == 0)
+ reason = "was not cleanly unmounted";
if (reason) {
printf("%s %s, check forced.\n", device_name, reason);
return;
}
- if (fs->super->s_state & EXT2_VALID_FS) {
- printf("%s: clean, %d/%d files, %d/%d blocks\n", device_name,
- fs->super->s_inodes_count - fs->super->s_free_inodes_count,
- fs->super->s_inodes_count,
- fs->super->s_blocks_count - fs->super->s_free_blocks_count,
- fs->super->s_blocks_count);
- ext2fs_close(fs);
- exit(FSCK_OK);
- }
+ printf("%s: clean, %d/%d files, %d/%d blocks\n", device_name,
+ fs->super->s_inodes_count - fs->super->s_free_inodes_count,
+ fs->super->s_inodes_count,
+ fs->super->s_blocks_count - fs->super->s_free_blocks_count,
+ fs->super->s_blocks_count);
+ ext2fs_close(fs);
+ exit(FSCK_OK);
}
#define PATH_SET "PATH=/sbin"
@@ -606,8 +606,11 @@ int main (int argc, char *argv[])
E2FSPROGS_VERSION, E2FSPROGS_DATE,
EXT2FS_VERSION, EXT2FS_DATE);
- if (show_version_only)
+ if (show_version_only) {
+ fprintf(stderr, "\tUsing %s\n",
+ error_message(EXT2_ET_BASE));
exit(0);
+ }
check_mount();
@@ -671,6 +674,12 @@ restart:
if (superblock && rwflag)
ext2fs_mark_super_dirty(fs);
+ /*
+ * Don't overwrite the backup superblock and block
+ * descriptors, until we're sure the filesystem is OK....
+ */
+ fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
+
ehandler_init(fs->io);
invalid_inode_bitmap = allocate_memory(sizeof(int) *
@@ -691,7 +700,8 @@ restart:
test_disk(fs);
if (normalize_swapfs) {
- if ((fs->flags & EXT2_SWAP_BYTES) == ext2fs_native_flag()) {
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ==
+ ext2fs_native_flag()) {
fprintf(stderr, "%s: Filesystem byte order "
"already normalized.\n", device_name);
fatal_error(0);
@@ -733,7 +743,9 @@ restart:
exit_value = FSCK_REBOOT;
}
}
- if (!ext2fs_test_valid(fs))
+ if (ext2fs_test_valid(fs))
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
+ else
exit_value = FSCK_UNCORRECTED;
if (rwflag) {
if (ext2fs_test_valid(fs)) {
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index 27ceecd6..0c860961 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -300,6 +300,11 @@ void pass1(ext2_filsys fs)
ext2fs_unmark_valid(fs);
}
}
+ if (ino == EXT2_BOOT_LOADER_INO) {
+ ext2fs_mark_inode_bitmap(inode_used_map, ino);
+ check_blocks(fs, ino, &inode, block_buf);
+ goto next;
+ }
if ((ino != EXT2_ROOT_INO) &&
(ino < EXT2_FIRST_INODE(fs->super))) {
ext2fs_mark_inode_bitmap(inode_used_map, ino);
@@ -755,7 +760,8 @@ int process_block(ext2_filsys fs,
* get called with BLOCK_FLAG_HOLE
*/
printf("process_block() called with blk == 0, "
- "inode %lu???", p->ino);
+ "blockcnt=%d, inode %lu???\n",
+ blockcnt, p->ino);
return 0;
}
if (blockcnt < 0)
diff --git a/e2fsck/pass4.c b/e2fsck/pass4.c
index f167d157..9733643a 100644
--- a/e2fsck/pass4.c
+++ b/e2fsck/pass4.c
@@ -8,6 +8,63 @@
#include "e2fsck.h"
+/*
+ * This routine is called when an inode is not connected to the
+ * directory tree.
+ *
+ * This subroutine returns 1 then the caller shouldn't bother with the
+ * rest of the pass 4 tests.
+ */
+int disconnect_inode(ext2_filsys fs, ino_t i)
+{
+ struct ext2_inode inode;
+
+ e2fsck_read_inode(fs, i, &inode, "pass4: disconnect_inode");
+ if (!inode.i_blocks && (LINUX_S_ISREG(inode.i_mode) ||
+ LINUX_S_ISDIR(inode.i_mode))) {
+ /*
+ * This is a zero-length file; prompt to delete it...
+ */
+ printf("Unattached zero-length inode %lu\n", i);
+ if (ask("Clear", 1)) {
+ inode_link_info[i] = 0;
+ inode.i_links_count = 0;
+ inode.i_dtime = time(0);
+ e2fsck_write_inode(fs, i, &inode,
+ "disconnect_inode");
+ /*
+ * Fix up the bitmaps...
+ */
+ read_bitmaps(fs);
+ ext2fs_unmark_inode_bitmap(inode_used_map, i);
+ ext2fs_unmark_inode_bitmap(inode_dir_map, i);
+ ext2fs_unmark_inode_bitmap(fs->inode_map, i);
+ ext2fs_mark_ib_dirty(fs);
+ return 0;
+ }
+ }
+
+ /*
+ * Prompt to reconnect.
+ */
+ printf("Unattached inode %lu\n", i);
+ preenhalt(fs);
+ if (ask("Connect to /lost+found", 1)) {
+ if (reconnect_file(fs, i))
+ ext2fs_unmark_valid(fs);
+ } else {
+ /*
+ * If we don't attach the inode, then skip the
+ * i_links_test since there's no point in trying to
+ * force i_links_count to zero.
+ */
+ ext2fs_unmark_valid(fs);
+ return 1;
+ }
+ return 0;
+}
+
+
void pass4(ext2_filsys fs)
{
ino_t i;
@@ -29,25 +86,8 @@ void pass4(ext2_filsys fs)
if (!(ext2fs_test_inode_bitmap(inode_used_map, i)))
continue;
if (inode_count[i] == 0) {
- /*
- * Inode isn't attached to the filesystem;
- * prompt to reconnect.
- */
- printf("Unattached inode %lu\n", i);
- preenhalt(fs);
- if (ask("Connect to /lost+found", 1)) {
- if (reconnect_file(fs, i))
- ext2fs_unmark_valid(fs);
- } else {
- /*
- * If we don't attach the inode, then
- * skip the i_links_test since there's
- * no point in trying to force
- * i_links_count to zero.
- */
- ext2fs_unmark_valid(fs);
+ if (disconnect_inode(fs, i))
continue;
- }
}
if (inode_count[i] != inode_link_info[i]) {
e2fsck_read_inode(fs, i, &inode, "pass4");
diff --git a/e2fsck/swapfs.c b/e2fsck/swapfs.c
index 291fcb3d..96f4ae3a 100644
--- a/e2fsck/swapfs.c
+++ b/e2fsck/swapfs.c
@@ -126,7 +126,7 @@ static void swap_inodes(ext2_filsys fs)
}
inode = (struct ext2_inode *) buf;
for (i=0; i < fs->super->s_inodes_per_group; i++, ino++) {
- if (fs->flags & EXT2_SWAP_BYTES_READ)
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES_READ)
ext2fs_swap_inode(fs, inode, inode, 0);
stashed_ino = ino;
stashed_inode = inode;
@@ -137,7 +137,7 @@ static void swap_inodes(ext2_filsys fs)
LINUX_S_ISDIR(inode->i_mode))
swap_inode_blocks(fs, ino, block_buf, inode);
- if (fs->flags & EXT2_SWAP_BYTES_WRITE)
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)
ext2fs_swap_inode(fs, inode, inode, 1);
inode++;
}
@@ -177,17 +177,19 @@ void swap_filesys(ext2_filsys fs)
"byte-swap it.\n", device_name);
fatal_error(0);
}
- if (fs->flags & EXT2_SWAP_BYTES) {
- fs->flags &= ~(EXT2_SWAP_BYTES|EXT2_SWAP_BYTES_WRITE);
- fs->flags |= EXT2_SWAP_BYTES_READ;
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
+ fs->flags &= ~(EXT2_FLAG_SWAP_BYTES|
+ EXT2_FLAG_SWAP_BYTES_WRITE);
+ fs->flags |= EXT2_FLAG_SWAP_BYTES_READ;
} else {
- fs->flags &= ~EXT2_SWAP_BYTES_READ;
- fs->flags |= EXT2_SWAP_BYTES_WRITE;
+ fs->flags &= ~EXT2_FLAG_SWAP_BYTES_READ;
+ fs->flags |= EXT2_FLAG_SWAP_BYTES_WRITE;
}
swap_inodes(fs);
- if (fs->flags & EXT2_SWAP_BYTES_WRITE)
- fs->flags |= EXT2_SWAP_BYTES;
- fs->flags &= ~(EXT2_SWAP_BYTES_READ|EXT2_SWAP_BYTES_WRITE);
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)
+ fs->flags |= EXT2_FLAG_SWAP_BYTES;
+ fs->flags &= ~(EXT2_FLAG_SWAP_BYTES_READ|
+ EXT2_FLAG_SWAP_BYTES_WRITE);
ext2fs_flush(fs);
if (tflag > 1) {
diff --git a/e2fsck/util.c b/e2fsck/util.c
index e12ff364..b099e665 100644
--- a/e2fsck/util.c
+++ b/e2fsck/util.c
@@ -160,7 +160,8 @@ void preenhalt(ext2_filsys fs)
{
if (!preen)
return;
- fprintf(stderr, "\n\n%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n",
+ fprintf(stderr, "\n\n%s: UNEXPECTED INCONSISTENCY; "
+ "RUN fsck MANUALLY.\n\t(i.e., without -a or -p options)\n",
device_name);
if (fs != NULL) {
fs->super->s_state |= EXT2_ERROR_FS;
diff --git a/e2fsprogs-1.05.spec b/e2fsprogs-1.06.spec
index 86430922..31d520de 100644
--- a/e2fsprogs-1.05.spec
+++ b/e2fsprogs-1.06.spec
@@ -1,10 +1,10 @@
Description: Tools for the second extended (ext2) filesystem
Name: e2fsprogs
-Version: 1.05
+Version: 1.06
Release: 0
Copyright: GPL
Group: Utilities/System
-Source: tsx-11.mit.edu:/pub/linux/packages/ext2fs/e2fsprogs-1.05.tar.gz
+Source: tsx-11.mit.edu:/pub/linux/packages/ext2fs/e2fsprogs-1.06.tar.gz
%package devel
Description: e2fs static libs and headers
diff --git a/include/linux/ChangeLog b/include/linux/ChangeLog
index 9b412222..eeaa07bf 100644
--- a/include/linux/ChangeLog
+++ b/include/linux/ChangeLog
@@ -1,3 +1,7 @@
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Thu May 16 11:12:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.04
diff --git a/install-utils/ChangeLog b/install-utils/ChangeLog
index f87005d9..d17f54f6 100644
--- a/install-utils/ChangeLog
+++ b/install-utils/ChangeLog
@@ -1,3 +1,7 @@
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Thu May 16 11:12:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.04
diff --git a/lib/ChangeLog b/lib/ChangeLog
index fe60daff..2c53f254 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,6 @@
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
Wed Aug 28 15:20:26 1996 Miles Bader <miles@gnu.ai.mit.edu>
* Makefile.elf-lib (installdirs-elf-lib): Renamed from installdirs
diff --git a/lib/e2p/ChangeLog b/lib/e2p/ChangeLog
index fe4fa5e9..a9a8f41a 100644
--- a/lib/e2p/ChangeLog
+++ b/lib/e2p/ChangeLog
@@ -1,3 +1,11 @@
+Sun Sep 22 16:20:12 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * pf.c: Add support for the 'A' (no atime) flag.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Sat Sep 7 14:48:35 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* ls.c (interval_string): Pretty print the check interval.
diff --git a/lib/e2p/pf.c b/lib/e2p/pf.c
index ec18dcb8..8ef00b82 100644
--- a/lib/e2p/pf.c
+++ b/lib/e2p/pf.c
@@ -32,6 +32,9 @@ static const unsigned long flags_array[] = {
#ifdef EXT2_NODUMP_FL
EXT2_NODUMP_FL,
#endif
+#ifdef EXT2_NOATIME_FL
+ EXT2_NOATIME_FL,
+#endif
0};
static const char * short_flags[] = {
@@ -48,6 +51,9 @@ static const char * short_flags[] = {
#ifdef EXT2_NODUMP_FL
"d",
#endif
+#ifdef EXT2_NOATIME_FL
+ "A",
+#endif
NULL};
static const char * long_flags[] = {
@@ -64,6 +70,9 @@ static const char * long_flags[] = {
#ifdef EXT2_NODUMP_FL
"No_Dump, ",
#endif
+#ifdef EXT2_NOATIME_FL
+ "No_Atime, ",
+#endif
NULL};
void print_flags (FILE * f, unsigned long flags, int long_format)
diff --git a/lib/et/ChangeLog b/lib/et/ChangeLog
index 22bb8b4a..e34d3452 100644
--- a/lib/et/ChangeLog
+++ b/lib/et/ChangeLog
@@ -1,3 +1,7 @@
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Thu May 16 11:12:30 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* Release of E2fsprogs version 1.04
diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog
index 41c9c54e..d8dad462 100644
--- a/lib/ext2fs/ChangeLog
+++ b/lib/ext2fs/ChangeLog
@@ -1,3 +1,30 @@
+Mon Oct 7 00:44:17 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * ext2fs.h, block.c, closefs.c, dirblock.c, inode.c, native.c,
+ open.c: Change EXT2_SWAP to EXT2_FLAG_SWAP for
+ consistency's sake.
+
+ * closefs.c (ext2fs_flush): If the flag EXT2_MASTER_SB_ONLY is
+ set, then only write out the master superblock.
+
+Sun Oct 6 21:45:26 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * block.c (ext2fs_block_iterate): Fixed bug which caused
+ block_iterate to fail to handle HURD created filesystems;
+ it tested the inode translator field before the inode was
+ loaded.
+
+Tue Sep 17 14:08:24 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * initialize.c (ext2fs_initialize): Make sure the description for
+ the inode bitmap is set correctly.
+
+ * bitmaps.c (ext2fs_allocate_generic_bitmap): Fix minor type typo.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Sat Sep 7 07:36:03 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* initialize.c: Override the kernel's idea of default
diff --git a/lib/ext2fs/bitmaps.c b/lib/ext2fs/bitmaps.c
index 7aaf5496..7250c800 100644
--- a/lib/ext2fs/bitmaps.c
+++ b/lib/ext2fs/bitmaps.c
@@ -28,7 +28,7 @@ errcode_t ext2fs_allocate_generic_bitmap(__u32 start,
const char *descr,
ext2fs_generic_bitmap *ret)
{
- ext2fs_inode_bitmap bitmap;
+ ext2fs_generic_bitmap bitmap;
int size;
bitmap = malloc(sizeof(struct ext2fs_struct_generic_bitmap));
diff --git a/lib/ext2fs/block.c b/lib/ext2fs/block.c
index 51385345..b7f0aa3b 100644
--- a/lib/ext2fs/block.c
+++ b/lib/ext2fs/block.c
@@ -58,8 +58,8 @@ static int block_iterate_ind(blk_t *ind_block, struct block_context *ctx)
return ret;
}
limit = ctx->fs->blocksize >> 2;
- if ((ctx->fs->flags & EXT2_SWAP_BYTES) ||
- (ctx->fs->flags & EXT2_SWAP_BYTES_READ)) {
+ if ((ctx->fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (ctx->fs->flags & EXT2_FLAG_SWAP_BYTES_READ)) {
block_nr = (blk_t *) ctx->ind_buf;
for (i = 0; i < limit; i++, block_nr++)
*block_nr = ext2fs_swab32(*block_nr);
@@ -89,8 +89,8 @@ static int block_iterate_ind(blk_t *ind_block, struct block_context *ctx)
}
}
if (changed & BLOCK_CHANGED) {
- if ((ctx->fs->flags & EXT2_SWAP_BYTES) ||
- (ctx->fs->flags & EXT2_SWAP_BYTES_WRITE)) {
+ if ((ctx->fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (ctx->fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)) {
block_nr = (blk_t *) ctx->ind_buf;
for (i = 0; i < limit; i++, block_nr++)
*block_nr = ext2fs_swab32(*block_nr);
@@ -133,8 +133,8 @@ static int block_iterate_dind(blk_t *dind_block, struct block_context *ctx)
return ret;
}
limit = ctx->fs->blocksize >> 2;
- if ((ctx->fs->flags & EXT2_SWAP_BYTES) ||
- (ctx->fs->flags & EXT2_SWAP_BYTES_READ)) {
+ if ((ctx->fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (ctx->fs->flags & EXT2_FLAG_SWAP_BYTES_READ)) {
block_nr = (blk_t *) ctx->dind_buf;
for (i = 0; i < limit; i++, block_nr++)
*block_nr = ext2fs_swab32(*block_nr);
@@ -162,8 +162,8 @@ static int block_iterate_dind(blk_t *dind_block, struct block_context *ctx)
}
}
if (changed & BLOCK_CHANGED) {
- if ((ctx->fs->flags & EXT2_SWAP_BYTES) ||
- (ctx->fs->flags & EXT2_SWAP_BYTES_WRITE)) {
+ if ((ctx->fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (ctx->fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)) {
block_nr = (blk_t *) ctx->dind_buf;
for (i = 0; i < limit; i++, block_nr++)
*block_nr = ext2fs_swab32(*block_nr);
@@ -206,8 +206,8 @@ static int block_iterate_tind(blk_t *tind_block, struct block_context *ctx)
return ret;
}
limit = ctx->fs->blocksize >> 2;
- if ((ctx->fs->flags & EXT2_SWAP_BYTES) ||
- (ctx->fs->flags & EXT2_SWAP_BYTES_READ)) {
+ if ((ctx->fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (ctx->fs->flags & EXT2_FLAG_SWAP_BYTES_READ)) {
block_nr = (blk_t *) ctx->tind_buf;
for (i = 0; i < limit; i++, block_nr++)
*block_nr = ext2fs_swab32(*block_nr);
@@ -235,8 +235,8 @@ static int block_iterate_tind(blk_t *tind_block, struct block_context *ctx)
}
}
if (changed & BLOCK_CHANGED) {
- if ((ctx->fs->flags & EXT2_SWAP_BYTES) ||
- (ctx->fs->flags & EXT2_SWAP_BYTES_WRITE)) {
+ if ((ctx->fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (ctx->fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)) {
block_nr = (blk_t *) ctx->tind_buf;
for (i = 0; i < limit; i++, block_nr++)
*block_nr = ext2fs_swab32(*block_nr);
@@ -298,16 +298,17 @@ errcode_t ext2fs_block_iterate(ext2_filsys fs,
* Iterate over the HURD translator block (if present)
*/
if ((fs->super->s_creator_os == EXT2_OS_HURD) &&
- !(flags & BLOCK_FLAG_DATA_ONLY) &&
- inode.osd1.hurd1.h_i_translator) {
+ !(flags & BLOCK_FLAG_DATA_ONLY)) {
ctx.errcode = ext2fs_read_inode(fs, ino, &inode);
if (ctx.errcode)
goto abort;
got_inode = 1;
- ret |= (*func)(fs, &inode.osd1.hurd1.h_i_translator,
- BLOCK_COUNT_TRANSLATOR, private);
- if (ret & BLOCK_ABORT)
- goto abort;
+ if (inode.osd1.hurd1.h_i_translator) {
+ ret |= (*func)(fs, &inode.osd1.hurd1.h_i_translator,
+ BLOCK_COUNT_TRANSLATOR, private);
+ if (ret & BLOCK_ABORT)
+ goto abort;
+ }
}
/*
diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
index d8b796e3..18a93db5 100644
--- a/lib/ext2fs/closefs.c
+++ b/lib/ext2fs/closefs.c
@@ -20,7 +20,7 @@
errcode_t ext2fs_flush(ext2_filsys fs)
{
- int i,j;
+ int i,j,maxgroup;
int group_block;
errcode_t retval;
char *group_ptr;
@@ -34,7 +34,7 @@ errcode_t ext2fs_flush(ext2_filsys fs)
fs_state = fs->super->s_state;
fs->super->s_wtime = time(NULL);
- if (fs->flags & EXT2_SWAP_BYTES) {
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
retval = ENOMEM;
if (!(super_shadow = malloc(SUPERBLOCK_SIZE)))
goto errout;
@@ -75,7 +75,7 @@ errcode_t ext2fs_flush(ext2_filsys fs)
* we exit.)
*/
fs->super->s_state &= ~EXT2_VALID_FS;
- if (fs->flags & EXT2_SWAP_BYTES) {
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
*super_shadow = *fs->super;
ext2fs_swap_super(super_shadow);
}
@@ -85,7 +85,9 @@ errcode_t ext2fs_flush(ext2_filsys fs)
* superblocks and group descriptors.
*/
group_block = fs->super->s_first_data_block;
- for (i = 0; i < fs->group_desc_count; i++) {
+ maxgroup = (fs->flags & EXT2_FLAG_MASTER_SB_ONLY) ? 1 :
+ fs->group_desc_count;
+ for (i = 0; i < maxgroup; i++) {
if (i !=0 ) {
retval = io_channel_write_blk(fs->io, group_block,
-SUPERBLOCK_SIZE,
@@ -120,7 +122,7 @@ errcode_t ext2fs_flush(ext2_filsys fs)
retval = 0;
errout:
fs->super->s_state = fs_state;
- if (fs->flags & EXT2_SWAP_BYTES) {
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
if (super_shadow)
free(super_shadow);
if (group_shadow)
diff --git a/lib/ext2fs/dirblock.c b/lib/ext2fs/dirblock.c
index 3d5dbb2b..0f56617d 100644
--- a/lib/ext2fs/dirblock.c
+++ b/lib/ext2fs/dirblock.c
@@ -27,7 +27,8 @@ errcode_t ext2fs_read_dir_block(ext2_filsys fs, blk_t block,
retval = io_channel_read_blk(fs->io, block, 1, buf);
if (retval)
return retval;
- if ((fs->flags & (EXT2_SWAP_BYTES|EXT2_SWAP_BYTES_READ)) == 0)
+ if ((fs->flags & (EXT2_FLAG_SWAP_BYTES|
+ EXT2_FLAG_SWAP_BYTES_READ)) == 0)
return 0;
p = buf;
end = (char *) buf + fs->blocksize;
@@ -49,8 +50,8 @@ errcode_t ext2fs_write_dir_block(ext2_filsys fs, blk_t block,
char *buf = 0;
struct ext2_dir_entry *dirent;
- if ((fs->flags & EXT2_SWAP_BYTES) ||
- (fs->flags & EXT2_SWAP_BYTES_WRITE)) {
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)) {
write_buf = buf = malloc(fs->blocksize);
if (!buf)
return ENOMEM;
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index f3857704..de746816 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -71,9 +71,10 @@ typedef struct ext2fs_struct_generic_bitmap *ext2fs_block_bitmap;
#define EXT2_FLAG_VALID 0x08
#define EXT2_FLAG_IB_DIRTY 0x10
#define EXT2_FLAG_BB_DIRTY 0x20
-#define EXT2_SWAP_BYTES 0x40
-#define EXT2_SWAP_BYTES_READ 0x80
-#define EXT2_SWAP_BYTES_WRITE 0x100
+#define EXT2_FLAG_SWAP_BYTES 0x40
+#define EXT2_FLAG_SWAP_BYTES_READ 0x80
+#define EXT2_FLAG_SWAP_BYTES_WRITE 0x100
+#define EXT2_FLAG_MASTER_SB_ONLY 0x200
/*
* Special flag in the ext2 inode i_flag field that means that this is
diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c
index 4108093e..43492441 100644
--- a/lib/ext2fs/initialize.c
+++ b/lib/ext2fs/initialize.c
@@ -227,7 +227,7 @@ retry:
goto cleanup;
sprintf(buf, "inode bitmap for %s", fs->device_name);
- retval = ext2fs_allocate_inode_bitmap(fs, 0, &fs->inode_map);
+ retval = ext2fs_allocate_inode_bitmap(fs, buf, &fs->inode_map);
if (retval)
goto cleanup;
diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c
index 7d25ae1c..8743476a 100644
--- a/lib/ext2fs/inode.c
+++ b/lib/ext2fs/inode.c
@@ -149,15 +149,15 @@ errcode_t ext2fs_get_next_inode(ext2_inode_scan scan, ino_t *ino,
scan->ptr += scan->inode_size - extra_bytes;
scan->bytes_left -= scan->inode_size - extra_bytes;
- if ((scan->fs->flags & EXT2_SWAP_BYTES) ||
- (scan->fs->flags & EXT2_SWAP_BYTES_READ))
+ if ((scan->fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (scan->fs->flags & EXT2_FLAG_SWAP_BYTES_READ))
ext2fs_swap_inode(scan->fs, inode,
(struct ext2_inode *) scan->temp_buffer, 0);
else
*inode = *((struct ext2_inode *) scan->temp_buffer);
} else {
- if ((scan->fs->flags & EXT2_SWAP_BYTES) ||
- (scan->fs->flags & EXT2_SWAP_BYTES_READ))
+ if ((scan->fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (scan->fs->flags & EXT2_FLAG_SWAP_BYTES_READ))
ext2fs_swap_inode(scan->fs, inode,
(struct ext2_inode *) scan->ptr, 0);
else
@@ -266,8 +266,8 @@ errcode_t ext2fs_read_inode (ext2_filsys fs, unsigned long ino,
} else
memcpy((char *) inode, ptr, length);
- if ((fs->flags & EXT2_SWAP_BYTES) ||
- (fs->flags & EXT2_SWAP_BYTES_READ))
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_READ))
ext2fs_swap_inode(fs, inode, inode, 0);
/* Update the inode cache */
@@ -322,8 +322,8 @@ errcode_t ext2fs_write_inode(ext2_filsys fs, unsigned long ino,
inode_buffer_size = fs->blocksize;
inode_buffer_block = 0;
}
- if ((fs->flags & EXT2_SWAP_BYTES) ||
- (fs->flags & EXT2_SWAP_BYTES_WRITE))
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
+ (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE))
ext2fs_swap_inode(fs, &temp_inode, inode, 1);
else
memcpy(&temp_inode, inode, sizeof(struct ext2_inode));
diff --git a/lib/ext2fs/native.c b/lib/ext2fs/native.c
index aa371ced..2f84bf7d 100644
--- a/lib/ext2fs/native.c
+++ b/lib/ext2fs/native.c
@@ -24,7 +24,7 @@ int ext2fs_native_flag(void)
{
if (i386_byteorder())
return 0;
- return EXT2_SWAP_BYTES;
+ return EXT2_FLAG_SWAP_BYTES;
}
diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
index 74bf2790..389bfc79 100644
--- a/lib/ext2fs/openfs.c
+++ b/lib/ext2fs/openfs.c
@@ -89,8 +89,8 @@ errcode_t ext2fs_open(const char *name, int flags, int superblock,
goto cleanup;
if ((fs->super->s_magic == ext2fs_swab16(EXT2_SUPER_MAGIC)) ||
- (fs->flags & EXT2_SWAP_BYTES)) {
- fs->flags |= EXT2_SWAP_BYTES;
+ (fs->flags & EXT2_FLAG_SWAP_BYTES)) {
+ fs->flags |= EXT2_FLAG_SWAP_BYTES;
ext2fs_swap_super(fs->super);
}
@@ -156,7 +156,7 @@ errcode_t ext2fs_open(const char *name, int flags, int superblock,
if (retval)
goto cleanup;
group_block++;
- if (fs->flags & EXT2_SWAP_BYTES) {
+ if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
gdp = (struct ext2_group_desc *) dest;
groups_per_block = fs->blocksize /
sizeof(struct ext2_group_desc);
diff --git a/lib/ss/ChangeLog b/lib/ss/ChangeLog
index 96b36120..2aca3d92 100644
--- a/lib/ss/ChangeLog
+++ b/lib/ss/ChangeLog
@@ -1,3 +1,7 @@
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Fri Aug 30 22:36:48 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* invocation.c (ss_create_invocation): Change function prototype
diff --git a/lib/ss/test_ss.c b/lib/ss/test_ss.c
index 3eddbabe..a4601f6e 100644
--- a/lib/ss/test_ss.c
+++ b/lib/ss/test_ss.c
@@ -9,8 +9,8 @@
* $Locker$
*
* $Log$
- * Revision 1.8 1997/04/29 14:52:31 tytso
- * Checked in e2fsprogs 1.05
+ * Revision 1.9 1997/04/29 15:29:28 tytso
+ * Checked in e2fsprogs 1.06
*
* Revision 1.1 1993/06/03 12:31:25 tytso
* Initial revision
diff --git a/lib/uuid/ChangeLog b/lib/uuid/ChangeLog
index 8803dedb..b276ddbf 100644
--- a/lib/uuid/ChangeLog
+++ b/lib/uuid/ChangeLog
@@ -1,3 +1,7 @@
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Tue Aug 27 16:50:43 1996 Miles Bader <miles@gnu.ai.mit.edu>
* uuid/gen_uuid.c [HAVE_NET_IF_H] <net/if.h>: Include guarded.
diff --git a/misc/ChangeLog b/misc/ChangeLog
index d5217737..11f7c04d 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -1,3 +1,18 @@
+Mon Oct 7 00:56:24 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * chattr.1.in: Documented the 'A' (noatime) attribute.
+
+ * dumpe2fs.c (main): Change EXT2_SWAP to EXT2_FLAG_SWAP for
+ consistency's sake.
+
+Sun Sep 22 16:18:47 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * chattr.c (decode_arg): Add support for the 'A' (noatime) flag.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Sat Sep 7 07:34:11 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* tune2fs.c (main): Add support for new option -C, which sets the
diff --git a/misc/chattr.1.in b/misc/chattr.1.in
index cfd4ff7d..ad38443a 100644
--- a/misc/chattr.1.in
+++ b/misc/chattr.1.in
@@ -62,13 +62,18 @@ the `sync' mount option applied to a subset of the files.
When a file with the `u' attribute set is deleted, its contents is saved.
This allows the user to ask for its undeletion.
+
+When a file with the 'A' attribute set is modified, its atime record is
+not modified. This avoid a certain amount of disk I/O for laptop
+systems.
.SH AUTHOR
.B chattr
has been written by Remy Card <card@masi.ibp.fr>, the developer and maintainer
of the ext2 fs.
.SH BUGS AND LIMITATIONS
As of ext2 fs 0.5a, the `c' and `u' attribute are not honoured by the kernel
-code.
+code. As of the Linux 2.0 kernel, the 'A' attribute is not yet supported by
+the kernel code. (The noatime code is still in testing.)
.PP
These attributes will be implemented in a future ext2 fs version.
.SH AVAILABILITY
diff --git a/misc/chattr.c b/misc/chattr.c
index b359248a..45e2c8fe 100644
--- a/misc/chattr.c
+++ b/misc/chattr.c
@@ -89,6 +89,12 @@ static int decode_arg (int * i, int argc, char ** argv)
rem = 1;
break;
#endif
+#ifdef EXT2_NOATIME_FL
+ case 'A':
+ rf |= EXT2_NOATIME_FL;
+ rem = 1;
+ break;
+#endif
case 'c':
rf |= EXT2_COMPR_FL;
rem = 1;
@@ -145,6 +151,11 @@ static int decode_arg (int * i, int argc, char ** argv)
af |= EXT2_APPEND_FL;
break;
#endif
+#ifdef EXT2_NOATIME_FL
+ case 'A':
+ af |= EXT2_NOATIME_FL;
+ break;
+#endif
case 'c':
af |= EXT2_COMPR_FL;
break;
@@ -181,6 +192,11 @@ static int decode_arg (int * i, int argc, char ** argv)
sf |= EXT2_APPEND_FL;
break;
#endif
+#ifdef EXT2_NOATIME_FL
+ case 'A':
+ sf |= EXT2_NOATIME_FL;
+ break;
+#endif
case 'c':
sf |= EXT2_COMPR_FL;
break;
diff --git a/misc/dumpe2fs.8.in b/misc/dumpe2fs.8.in
index 0dc1922a..28fa320d 100644
--- a/misc/dumpe2fs.8.in
+++ b/misc/dumpe2fs.8.in
@@ -7,6 +7,12 @@
dumpe2fs \- dump filesystem information
.SH SYNOPSIS
.B dumpe2fs
+[
+.B -b
+]
+[
+.B -V
+]
device
.SH DESCRIPTION
.BI dumpe2fs
@@ -18,6 +24,13 @@ present on
is similar to Berkeley's
.BI dumpfs
program for the BSD Fast File System.
+.SH OPTIONS
+.TP
+.I -b
+print the blocks which are reserved as bad in the filesystem.
+.TP
+.I -V
+print the version number of dumpe2fs and exit.
.SH BUGS
You need to know the physical filesystem structure to understand the
output.
diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index 740f01bc..069ad644 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -39,7 +39,7 @@ char * device_name = NULL;
static volatile void usage (void)
{
- fprintf (stderr, "usage: %s device\n", program_name);
+ fprintf (stderr, "usage: %s [-bV] device\n", program_name);
exit (1);
}
@@ -166,17 +166,23 @@ void main (int argc, char ** argv)
int big_endian;
char c;
+ initialize_ext2_error_table();
fprintf (stderr, "dumpe2fs %s, %s for EXT2 FS %s, %s\n",
E2FSPROGS_VERSION, E2FSPROGS_DATE,
EXT2FS_VERSION, EXT2FS_DATE);
if (argc && *argv)
program_name = *argv;
- while ((c = getopt (argc, argv, "b")) != EOF) {
+ while ((c = getopt (argc, argv, "bV")) != EOF) {
switch (c) {
case 'b':
print_badblocks++;
break;
+ case 'V':
+ /* Print version number and exit */
+ fprintf(stderr, "\tUsing %s\n",
+ error_message(EXT2_ET_BASE));
+ exit(0);
default:
usage ();
}
@@ -184,7 +190,6 @@ void main (int argc, char ** argv)
if (optind > argc - 1)
usage ();
device_name = argv[optind++];
- initialize_ext2_error_table();
retval = ext2fs_open (device_name, 0, 0, 0, unix_io_manager, &fs);
if (retval) {
com_err (program_name, retval, "while trying to open %s",
@@ -203,7 +208,7 @@ void main (int argc, char ** argv)
ext2fs_close (fs);
exit (1);
}
- big_endian = ((fs->flags & EXT2_SWAP_BYTES) != 0);
+ big_endian = ((fs->flags & EXT2_FLAG_SWAP_BYTES) != 0);
if (!i386_byteorder())
big_endian = !big_endian;
if (big_endian)
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 11367d89..9c89fe7f 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,20 @@
+Mon Oct 7 07:52:41 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * f_preen: New test case which makes sure that e2fsck -p won't
+ bash the backup superblock in case of a corrupted master
+ superblock.
+
+ * test_script.in: Let the environment variable TEST_CONFIG to
+ override the location of the test_config file. Move
+ definition of TMP_DIR to test_config.
+
+ * test_config: Add new defnitions for mke2fs, dumpe2fs, tune2fs,
+ lsattr, and chattr.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Mon Sep 9 23:09:47 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* Makefile.in (check): Add explicit ./ to test_script invokation,
diff --git a/tests/f_expand/expect.1 b/tests/f_expand/expect.1
index aca5ee42..e6ff784e 100644
--- a/tests/f_expand/expect.1
+++ b/tests/f_expand/expect.1
@@ -1,11 +1,8 @@
-Filesystem did not have a UUID; generating one.
-
Pass 1: Checking inodes, blocks, and sizes
-Deleted inode 2 has zero dtime.
-Set dtime? yes
+Root inode is not a directory. Clear? yes
Pass 2: Checking directory structure
-Entry '..' in /lost+found (11) has deleted/unused inode 2.
+Entry '..' in ??? (11) has deleted/unused inode 2.
Clear? yes
Pass 3: Checking directory connectivity
@@ -556,6 +553,12 @@ Connect to /lost+found? yes
Inode 100 has ref count 2, expecting 1.
Set i_nlinks to count? yes
+Unattached inode 101
+Connect to /lost+found? yes
+
+Inode 101 has ref count 2, expecting 1.
+Set i_nlinks to count? yes
+
Unattached inode 102
Connect to /lost+found? yes
@@ -574,16 +577,57 @@ Connect to /lost+found? yes
Inode 104 has ref count 2, expecting 1.
Set i_nlinks to count? yes
+Unattached inode 105
+Connect to /lost+found? yes
+
+Inode 105 has ref count 2, expecting 1.
+Set i_nlinks to count? yes
+
+Unattached inode 106
+Connect to /lost+found? yes
+
+Inode 106 has ref count 2, expecting 1.
+Set i_nlinks to count? yes
+
+Unattached inode 107
+Connect to /lost+found? yes
+
+Inode 107 has ref count 2, expecting 1.
+Set i_nlinks to count? yes
+
+Unattached inode 108
+Connect to /lost+found? yes
+
+Inode 108 has ref count 2, expecting 1.
+Set i_nlinks to count? yes
+
+Unattached inode 109
+Connect to /lost+found? yes
+
+Inode 109 has ref count 2, expecting 1.
+Set i_nlinks to count? yes
+
+Unattached inode 110
+Connect to /lost+found? yes
+
+Inode 110 has ref count 2, expecting 1.
+Set i_nlinks to count? yes
+
+Unattached inode 111
+Connect to /lost+found? yes
+
+Inode 111 has ref count 2, expecting 1.
+Set i_nlinks to count? yes
+
Pass 5: Checking group summary information
Fix summary information? yes
-Block bitmap differences: -33. FIXED
-Free blocks count wrong for group 0 (68, counted=67). FIXED
-Free blocks count wrong (68, counted=67). FIXED
-Free inodes count wrong for group #0 (1, counted=0). FIXED
+Free blocks count wrong for group 0 (56, counted=55). FIXED
+Free blocks count wrong (56, counted=55). FIXED
+Free inodes count wrong for group #0 (89, counted=88). FIXED
Directories count wrong for group #0 (2, counted=3). FIXED
-Free inodes count wrong (1, counted=0). FIXED
+Free inodes count wrong (89, counted=88). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
-test_filesys: 104/104 files (0.0% non-contiguous), 33/100 blocks
+test_filesys: 112/200 files (0.0% non-contiguous), 145/200 blocks
Exit status is 1
diff --git a/tests/f_expand/expect.2 b/tests/f_expand/expect.2
index 4ded3c43..533d5559 100644
--- a/tests/f_expand/expect.2
+++ b/tests/f_expand/expect.2
@@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
-test_filesys: 104/104 files (0.0% non-contiguous), 33/100 blocks
+test_filesys: 112/200 files (0.9% non-contiguous), 145/200 blocks
Exit status is 0
diff --git a/tests/f_expand/image.gz b/tests/f_expand/image.gz
index e79eb327..4e9ac84a 100644
--- a/tests/f_expand/image.gz
+++ b/tests/f_expand/image.gz
Binary files differ
diff --git a/tests/f_mke2fs2b/expect.1 b/tests/f_mke2fs2b/expect.1
index 325b12e3..0ec57285 100644
--- a/tests/f_mke2fs2b/expect.1
+++ b/tests/f_mke2fs2b/expect.1
@@ -12,19 +12,11 @@ Clear dtime? yes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
-Unattached inode 15
-Connect to /lost+found? yes
-
-Inode 15 has ref count 2, expecting 1.
-Set i_nlinks to count? yes
+Unattached zero-length inode 15
+Clear? yes
Pass 5: Checking group summary information
-Fix summary information? yes
-
-Inode bitmap differences: +15. FIXED
-Free inodes count wrong for group #0 (17, counted=16). FIXED
-Free inodes count wrong (17, counted=16). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
-test_filesys: 16/32 files (0.0% non-contiguous), 25/100 blocks
+test_filesys: 15/32 files (0.0% non-contiguous), 25/100 blocks
Exit status is 1
diff --git a/tests/f_mke2fs2b/expect.2 b/tests/f_mke2fs2b/expect.2
index 763dc472..10455d70 100644
--- a/tests/f_mke2fs2b/expect.2
+++ b/tests/f_mke2fs2b/expect.2
@@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
-test_filesys: 16/32 files (0.0% non-contiguous), 25/100 blocks
+test_filesys: 15/32 files (0.0% non-contiguous), 25/100 blocks
Exit status is 0
diff --git a/tests/f_noroot/expect.1 b/tests/f_noroot/expect.1
index 4c146383..90999029 100644
--- a/tests/f_noroot/expect.1
+++ b/tests/f_noroot/expect.1
@@ -29,22 +29,18 @@ Set i_nlinks to count? yes
Inode 12 has ref count 4, expecting 3.
Set i_nlinks to count? yes
-Unattached inode 15
-Connect to /lost+found? yes
-
-Inode 15 has ref count 2, expecting 1.
-Set i_nlinks to count? yes
+Unattached zero-length inode 15
+Clear? yes
Pass 5: Checking group summary information
Fix summary information? yes
Free blocks count wrong for group 0 (75, counted=74). FIXED
Free blocks count wrong (75, counted=74). FIXED
-Inode bitmap differences: +15. FIXED
-Free inodes count wrong for group #0 (17, counted=15). FIXED
+Free inodes count wrong for group #0 (17, counted=16). FIXED
Directories count wrong for group #0 (4, counted=5). FIXED
-Free inodes count wrong (17, counted=15). FIXED
+Free inodes count wrong (17, counted=16). FIXED
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
-test_filesys: 17/32 files (0.0% non-contiguous), 26/100 blocks
+test_filesys: 16/32 files (0.0% non-contiguous), 26/100 blocks
Exit status is 1
diff --git a/tests/f_noroot/expect.2 b/tests/f_noroot/expect.2
index b9c4e8a7..5ea5bc71 100644
--- a/tests/f_noroot/expect.2
+++ b/tests/f_noroot/expect.2
@@ -3,5 +3,5 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
-test_filesys: 17/32 files (0.0% non-contiguous), 26/100 blocks
+test_filesys: 16/32 files (0.0% non-contiguous), 26/100 blocks
Exit status is 0
diff --git a/tests/f_preen/expect.1 b/tests/f_preen/expect.1
new file mode 100644
index 00000000..7197232e
--- /dev/null
+++ b/tests/f_preen/expect.1
@@ -0,0 +1,12 @@
+which require relocation, or one part of the inode table
+which must be moved, you may wish to try running e2fsck
+the '-b 8193' option first. The problem may lie only with
+the primary block group descriptor, and the backup block
+group descriptor may be OK.
+
+Block bitmap for group 0 is not in group. (block 0)
+
+
+test_filesys: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
+ (i.e., without -a or -p options)
+Exit status is 4
diff --git a/tests/f_preen/expect.2 b/tests/f_preen/expect.2
new file mode 100644
index 00000000..9d30709d
--- /dev/null
+++ b/tests/f_preen/expect.2
@@ -0,0 +1,18 @@
+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
+Fix summary information? yes
+
+Free blocks count wrong for group 0 (8042, counted=7614). FIXED
+Free blocks count wrong for group 1 (170, counted=169). FIXED
+Free blocks count wrong (8212, counted=7783). FIXED
+Free inodes count wrong for group #0 (1053, counted=1052). FIXED
+Free inodes count wrong for group #1 (1064, counted=1063). FIXED
+Directories count wrong for group #1 (0, counted=1). FIXED
+Free inodes count wrong (2117, counted=2115). FIXED
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 13/2128 files (0.0% non-contiguous), 717/8500 blocks
+Exit status is 1
diff --git a/tests/f_preen/image.gz b/tests/f_preen/image.gz
new file mode 100644
index 00000000..3aa7ca04
--- /dev/null
+++ b/tests/f_preen/image.gz
Binary files differ
diff --git a/tests/f_preen/name b/tests/f_preen/name
new file mode 100644
index 00000000..35a54888
--- /dev/null
+++ b/tests/f_preen/name
@@ -0,0 +1 @@
+preen should't destroy backup superblocks
diff --git a/tests/f_preen/script b/tests/f_preen/script
new file mode 100644
index 00000000..40ed11c3
--- /dev/null
+++ b/tests/f_preen/script
@@ -0,0 +1,4 @@
+FSCK_OPT=-pf
+SECOND_FSCK_OPT=-yfb8193
+
+. $cmd_dir/run_e2fsck
diff --git a/tests/test_config b/tests/test_config
index 5eb3627a..5e3ebb24 100644
--- a/tests/test_config
+++ b/tests/test_config
@@ -3,8 +3,14 @@
#
FSCK=../e2fsck/e2fsck
+MKE2FS=../misc/mke2fs
+DUMPE2FS=../misc/dumpe2fs
+TUNE2FS=../misc/tune2fs
+CHATTR=../misc/chattr
+LSATTR=../misc/lsattr
DEBUGFS=../debugfs/debugfs
LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
+TMPFILE=./test.img
export LD_LIBRARY_PATH
TZ=GMT
export TZ
diff --git a/tests/test_script.in b/tests/test_script.in
index 38a0f45c..b06e9052 100644
--- a/tests/test_script.in
+++ b/tests/test_script.in
@@ -14,9 +14,12 @@ else
fi
cmd_dir=$SRCDIR
-TMPFILE=./test.img
-. $SRCDIR/test_config
+if test "$TEST_CONFIG"x = x; then
+ TEST_CONFIG=$SRCDIR/test_config
+fi
+
+. $TEST_CONFIG
for test_dir in $TESTS
do
diff --git a/version.h b/version.h
index f2aae1bd..37c017af 100644
--- a/version.h
+++ b/version.h
@@ -6,6 +6,6 @@
* under the GNU Public License.
*/
-#define E2FSPROGS_VERSION "1.05"
-#define E2FSPROGS_DATE "9-Sep-96"
+#define E2FSPROGS_VERSION "1.06"
+#define E2FSPROGS_DATE "7-Oct-96"