journal.c (e2fsck_check_ext3_journal): Force a fsck if we remove the
journal stored on a reserved inode. Also force a fsck if the journal
appears to exist while !NEEDS_RECOVERY, and we forcibly reset the
journal.
journal.c, pass1.c, super.c, unix.c: Replace use of struct ext2fs_sb
with struct ext2_super_block.
ChangeLog, debugfs.c:
debugfs.c Replace use of struct ext2fs_sb with struct ext2_super_block.
ext2fs.h: Cleaned up header file by removing definitions of feature
flags that might not have been defined in older ext2 header files.
Now that we're using our own include/linux/ext2fs.h header file, this
can never happen.
jfs_dat.h: Removed old header file which is no longer needed.
ChangeLog:
jfs_compat.h: Remove uneeded header file.
problem.h: Fixed numbering of pass1 error messages; an extra 0 had
slipped into some of the numbers. (Pointed out by Andreas Dilger)
journal.c (e2fsck_journal_fix_corrupt_super): Clean up unnecessary
automatic variable. Add explanatory comment about the kernel
emulation routines. (Suggested by Andreas Dilger)
super.c (release_orphan_inodes): Fix spelling typo in error message.
ChangeLog, unix.c:
unix.c (main): Clarify coments (no code changes)
ChangeLog, journal.c:
journal.c (e2fsck_check_ext3_journal): Check to make sure the journal
fields are consistent if any of the superblock fields are set. (Backs
out erroneous change made by sct, pointed out by Andreas.)
super.c (check_super_block): If we have any of the compatibility flags
set, we need to have a revision 1 filesystem. Most kernels will not
check the flags on a rev 0 filesystem and we may have corruption
issues because of the incompatible changes to the filesystem. Patch
from Andreas Dilger.
flushb.c: Fix flushb so that it does something other than waste disk
space when built on systems with modern header files and add a
non-subtle Copyright Licensing restriction so Yann will remove it from
the Debian Distribution. (Now violates the Debian Free Software
Guidelines, on purpose.)
jfs_e2fsck.h, jfs_user.h: Replaces jfs_compat.h. The jfs.h file has
been moved to the include/linux directory.
journal.c, revoke.c, recovery.c: Updated files from Stephen to support
the V2 superblock and revoke processing. The journal.c and revoke.c
files are copies from the ext3 kernel source.
Makefile.in: Added revoke.c to the list of source/object files.
Makefile.in:
Fix up some mistakes in the source file list, and regenerate the
dependencies.
Update Makefile dependencies.
ChangeLog, jfs.h:
jfs.h: Remove excess #include of JFS_DEBUG. Not needed for e2fsprogs,
since we optioanlly define it in the configuration file system.
pass1b.c: Change routines to use PR_1B_BLOCK_ITERATE when reporting
problems rather than using com_err directly.
problem.c, problem.h (PR_1B_BLOCK_ITERATE): Add new problem code.
message.c (expand_percent_expression): Add safety check. If ctx->str
is NULL, print "NULL" instead of dereferencing the null pointer.
pass1b.c, pass2.c, pass3.c: Change calls to ext2fs_block_iterate to
ext2fs_block_iterate2, to support 64-bit filesizes and to speed things
up slightly by avoiding the use of the ext2fs_block_iterate's
compatibility shim layer.
version.h:
Update for WIP release.
jfs.h, jfs_compat.h, journal.c: Updated to include the definition of
the new journal superblock format; still only supports V1 superblocks
for now. (From sct)
super.c (release_inode_block, release_inode_blocks,
release_orphan_inodes): Add code to deal with truncating inodes which
are still in use (but which are on the orphan list because they need
truncation).
problem.c, problem.h: Rename PR_0_CLEAR_ORPHAN_INODE to
PR_0_ORPHAN_CLEAR_INODE, and remove PR_0_ORPHAN_INODE_INUSE.
journal.c (e2fsck_run_ext3_journal): Add i18n support, and print a
message when the journal is being recovered.
jfs_compat.h (J_ASSERT):
journal.c (e2fsck_run_ext3_journal):
pass3.c (adjust_inode_count): Use fatal_error() instead of exit().
ChangeLog, super.c:
super.c (release_orphan_inodes): Fix typo; should do bounds checking
on next_ino instead of ino.
unix.c: Use fatal_error() instead of exit() whenever possible. Also
fix the fsck exit codes so that we use FSCK_USAGE when it is
appropriate. Rename global_signal_ctx to e2fsck_global_ctx and let it
be exported globally.
journal.c (e2fsck_journal_load): Fix **nasty** bug which caused
e2fsck_check_ext3_journal to smash the journal because
journal->j_transaction_sequence wasn't getting initialized.
journal.c: (recover_ext3_journal, e2fsck_run_ext3_journal): Move call
to e2fsck_clear_recover from recover_ext3_journal to after the
filesystem has been closed and reopened. Otherwise, the superblock in
the filesystem handle will probably be stale, and will overwrite the
newer version of the superblock written by the log recovery.
message.c (expand_inode_expression): Add support for %Iu and %Ig
problem.h (PR_0_CLEAR_ORPHAN_INODE): Add new problem code.
super.c (release_orphan_inodes, release_inode_block,
release_inode_blocks): Update the block group descriptor counts when
freeing the orphan inode. Use PR_0_CLEAR_ORPHAN_INODE to report when
we clear an orphan.
journal.c (e2fsck_run_ext3_journal): Fix a bug where we attempted to
reopen the filesystem using the device name instead of the filesystem
name.
Makefile.in: Update the make dependencies
problem.c, problem.h: Add the problem codes:
PR_0_ORPHAN_ILLEGAL_BLOCK_NUM, PR_0_ORPHAN_ALREADY_CLEARED_BLOCK,
PR_0_ORPHAN_ILLEGAL_HEAD_INODE, PR_0_ORPHAN_ILLEGAL_INODE,
PR_0_ORPHAN_INODE_INUSE
super.c (release_inode_blocks, release_orphan_inodes,
check_super_block): Add support for clearing orphaned inodes from the
unmounted filesystem.
journal.c (e2fsck_recover_ext3_journal): Remove the last orphan check;
this is now handled in check_super_block --- non-journaled filesystems
can use the orphan list in the future. Also, move the the re-opening
of the filesystem to e2fsck_run_ext3_journal().
debugfs.c:
debugfs.c (finish_range): Make sure the pager FILE pointer to use.
configure, configure.in, ChangeLog:
configure.in (JFS_DEBUG): Add support for --enable-jfs-debug
journal.c: implement loading of ext3 journal for recovery code
problem.c (fix_problem): return answer from PR_AFTER_CODE to caller.
Add journal problems.
recovery.c (journal_recover): user-space ext3 journal recovery code
unix.c (main) : check journal and do recovery in separate steps
jfs.h, recovery.c: Files ext3 kernel code.
jfs_compat.h: Compatibility header file to allow kernel code to be
linked to e2fsck.
Commit this file for future use; contains a configure.in script for when
libuuid gets separtead out into its own package.
libext2fs.texinfo:
Update version numbers for 1.19 release.
TODO:
Commit TODO list for 1.19 release.
README:
Update file for 1.19 release.
ChangeLog, e2fsprogs.spec:
e2fsprogs.spec: Merge in a few changes from the Red Hat 6.2 spec file,
now that we're using a modern rpm to build e2fsprogs. Also updated
version number to 1.19.
version.h:
Update version number for 1.19 release.
ChangeLog:
Check in changes for 1.19 release.
unix.c (check_if_skip): Modify algorithm for checking s_max_mnt_count
to match with the kernel. (If s_max_mnt_count is negative, ignore the
mnt_count check.)
unix.c (e2fsck_update_progress): Adjust the width of the progress bar
dynamically, based on the filesystem name that we need to display.
unix.c (main): If the ext3 needs_recovery flag is set, call
e2fsck_run_ext3_journal() and then restart the e2fsck run.
journal.c (e2fsck_run_ext3_journal): New file which contains logic to
recover the ext3 journal. This version relies on the kernel being
able to mount the filesystem in order to run the journal.
Makefile.in (install): Install resize2fs in /sbin, not /usr/sbin.
ChangeLog, unix.c:
unix.c: Also, re-arrange the logic so that we do the time check only
after doing the percentage check, and we only advance the spinner if
we're about to display it.
ChangeLog:
Fix minor wording error in Chagelog.
unix.c (e2fsck_update_progress): Only save and check the last
percentage after multiplying it by 10, nor 1000, since we only need to
save values to a tenth of a percent (and the percentage is already
from 0 .. 100%, not 0 .. 1).
pass1.c (e2fsck_pass1): Check to see if the ext3 s_last_orphan field
is set; if so, clear it, so that ext3 mounting code won't get confused
by the fact that we've cleared out the orphaned inodes.
pass5.c (check_block_bitmaps, check_inode_bitmaps): Add error checking
for a "should never happen case".
problem.c, problem.h (PR_5_COPY_IBITMAP_ERROR,
PR_5_COPY_BBITMAP_ERROR): Add new error codes.
pass1.c (pass1, check_size): Apply patch from Chris Wedgewood
(cw@foof.org) which checks to see if special devices have a non-zero
size, and deals with it.
problem.c, problem.h (PR1_SET_NONZSIZE): Add new problem code.
getsize.c: Under linux, manually define the ioctl for BLKGETSIZE if it
isn't already defined and it's safe to do so.
.cvsignore:
Ignore build files when builddir==srcdir
Makefile.in (install): Create a symbolic link for fsck.ext3 as well.
ChangeLog, e2fsprogs.spec:
e2fsprogs.spec (fsck.ext3): Add /sbin/fsck.ext3 to the spec file.
problem.c, problem.h (PR_0_HURD_CLEAR_FILETYPE): Add new problem code.
super.c (check_super_block): If the OS type in the superblock is the
Hurd, check to see if the filetype feature is set, and offer to clear
it if so. This needs to be done since the Hurd doesn't properly
support the filetype feature. (And since the hurd allows the
transmogrification of files to special files and vice versa --- for no
good reason that I can understand --- it can't support the filetype
feature for the forseeable future, either.)
ChangeLog, mke2fs.c:
mke2fs.c (main): We forcibly turn off the filetype feature if the OS
is the hurd, since the hurd doesn't support it. (And since the hurd
allows the transmogrification of files to special files and vice versa
--- for no good reason that I can understand --- it can't support the
filetype feature for the forseeable future, either.)
mke2fs.c (proceed_question): Fix reversed sense of proceed_question
that was busted due to the internationalization patch. Fixed bug
where if proceed_question was called twice, the input buffer wasn't
cleared of the previous question's newline.
ChangeLog, expect.1, expect.2, image.gz, name:
f_hurd: Add test for Hurd-specific features (right now, just checks to
make sure the filetype feature is cleared)
ChangeLog, ls.c:
ls.c (list_super): Change the string displayed for the Hurd to be
GNU/Hurd, instead of just "GNU".
badblocks.c, dumpe2fs.c, e2label.c, mke2fs.c, tune2fs.c, uuidgen.c:
For platforms that don't define optarg.h, manually define optarg and
optind.
ChangeLog, main.c:
main.c: For platforms that don't define optarg.h, manually define
optarg and optind.
ChangeLog, unix.c:
unix.c: For platforms that don't define optarg.h, manually define
optarg and optind.
pass1.c (check_immutable, e2fsck_pass1_check_device_inode): Check for
the append-only as well as the immutable flag.
problem.c (PR_1_SET_IMMUTABLE): Adjust message to include append-only
flag. Fix comment for compression flag.
unix.c (e2fsck_update_progress): Limit the number of updates to the
progress bars to 8 times a second. This allows a 9600 baud console
link to keep up.
unix.c (main): If compression is enabled on the filesystem, print a
warning message (for now).
message.c: Add new compression shortcut: @c == compress
problem.c, problem.h (PR_1_COMPR_SET): Add new error code.
pass1.c (check_blocks): If the inode has EXT2_COMPRBLK_FL flag set,
check to see if the filesystem supports compression. If it does pass
this information down to process_block() so it can treat the
compressed block flag words correctly. If not, offer to clear the
flag, since it shouldn't be set.
(process_block): If an inode has the compressed inode flag set, allow
EXT2FS_COMPRESSED_BLKADDR.
pass1b.c (process_pass1b_block, delete_file_block, clone_file_block):
pass2.c (deallocate_inode_block): Use HOLE_BLKADDR to check to see if
the block can be skipped.
ChangeLog, Makefile.in:
Makefile.in: Exclude the internationalization files from being
distributed.
ChangeLog, configure, configure.in:
configure.in: Add support for --enable-compression. This is
experimental code only for now, which is why it's under --enable test.
Once it's stable, it will always be compiled in.
TODO:
Commit additional TODO items.
e2fsck.h:
pass1.c (mark_table_blocks, e2fsck_pass1): Remove
ctx->block_illegal_map, since it's not needed by pass1, and pass1b has
been modified to calculate it manually if needed. This reduces the
memory footprint needed by e2fsck.
pass1b.c (check_if_fs_block): New static function which returns
whether or not a block overlaps with filesystem metadata. This
replaces consulting the block_illegal_map bitmap.
util.c:
Make resource tracking message more concise.
bitops.h (ext2fs_mark_generic_bitmap, ext2fs_unmark_generic_bitmap,
ext2fs_mark_block_bitmap, ext2fs_unmark_block_bitmap,
ext2fs_mark_inode_bitmap, ext2fs_unmark_inode_bitmap): Change to
return the previous state of the bit that is being marked or unmarked.
For speed optimization.
ChangeLog, pass3.c:
pass3.c (check_directory): Only do the loop detection algorithm if
we've searched over 2048 parent directories and haven't found the end
yet. This means that in the common case, we don't allocate or clear
the inode_loop_detection bitmap, which for large systems, merely
clearing the bitmap for each directory was turning out to be quite
expensive. Thanks to Jani Jaakkola (jjaakkol@cs.helsinki.fi) for
identifying this problem.
ChangeLog, Makefile.in, e2fsck.h, unix.c:
Makefile.in: Call sync after finishing building all in this directory.
unix.c (PRS): sync the filesystem before trying to use BLKFLSBUF, to
minimize the chance of causing dirty blocks to get dropped.
e2fsck.h: Manually define BLKFLSBUF if not defined, and we're on a
Linux/i386 system.
debugfs.c (dump_inode): Remove #ifdef for i_version vs. i_generation
since we know it will always be i_generation now.
ChangeLog, e2fsck.h, flushb.c, scantest.c:
e2fsck.h, flushb.c, scantest.c: Remove uneeded include of linux/fs.h
bmap.c:
Fix silly spelling typo.
ChangeLog, getsize.c, ismounted.c, swapfs.c:
getsize.c, ismounted.c: Remove unneeded include of linux/fs.h
swapfs.c: Remove #ifdef HAVE_EXT2_INODE_VERSION since it's not needed
any more; we know it will always be i_generation. Add support for
swapping the high bits of the uid and gid.
Makefile.in (distclean): Remove TAGS and Makefile.in.old from the
source directory. Also, when making the .exclude file for the
source_tar_file, exclude those two files as well.
Makefile.in (distclean): Remove TAGS and Makefile.in.old from the
source directory.
problem.c (fix_problem): Support a new flag, PR_PREEN_NO which means
the answer is assumed to be no in preen mode. This is now used in the
PR_1_SET_IMMUTABLE code, so that in preen mode we ignore these inodes
and just print a warning message.
pass1.c (e2fsck_pass1): If the filesystem does not support imagic
inodes, if an inode has the imagic flag set, offer to clear the imagic
flag. If a valid device/fifo/socket has the immutable flag set, call
the new helper function check_immutable() to offerto clear the
immutable flag.
pass2.c (check_filetype): Use the new ext2_file_type() helper function
instead of calculating the file_type information manually.
pass3.c (e2fsck_reconnect_file): When adding a link to lost+found,
calculate the filetype information so that ext2fs_link() can use the
information if applicable. (get_lost_and_found): Create the
/lost+found directory with the correct filetype information if
applicable.
util.c (ext2_file_type), e2fsck.h: New function which returns the
directory entry file type information given the inode's mode bits.
problem.c, problem.h: Added new problem codes PR_1_SET_IMAGIC and
PR_1_SET_IMMUTABLE.
ChangeLog, mke2fs.8.in:
mke2fs.8.in: Update manual page so that the sparse_option filesystem
option is properly named.
pass4.c (e2fsck_pass4): Clear inode_imagic_map after freeing it, to
prevent it from getting freed twice.
unix.c (main): Close the filesystem before freeing the context, so
that in the event of a free()-related segmentation violation, the
filesystem is properly closed and written out.
e2fsck.c (e2fsck_reset_context): When freeing ctx->inode_reg_map, we
weren't zero'ing ctx->inode_reg_map, which could cause a segfault
later on in the e2fsck run.
problem.h (PR_2_SPLIT_DOT): Fix excess zero in problem code (now
matches the standard convention).
debugfs.h: Add declaration for do_features()
debugfs.c: Add #incldue of e2p.h to fix gcc warnings.
ChangeLog, message.c:
message.c (safe_print): Make safe_print take an char instead of an
unsigned char to fix gcc warnings.
mke2fs.c (PRS): Use __u64 instead of long long for portability
reasons.
Moved #include of sys/stat.h inside #ifdef HAVE_LINUX_MAJOR_H for
portability reasons.
ChangeLog, util.c:
util.c: For NT portability, don't redefine getchar(), since stdio
defines that. Instead we introduce a new abstract macro read_a_char()
which is #defined to the right function as necessary.
problem.c, problem.h (PR_2_NULL_NAME): Add new problem code.
pass2.c (check_dir_block): Require that the length of the directory
entry be at least 12 bytes. Check to see if the filename is
zero-length, and flag that as an error.
pass2.c (check_filetype): If the filetype filesystem feature is not
set, and a directory entry has a dirent feature, offer to clear it
(since 2.0 kernels will do complain will interpret it as a very large
name length field).
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
pass4.c (e2fsck_pass4): If an inode is set in the inode_imagic_map
bitmap, don't check to see if it is disconnected from the inode tree
(because it almost certainly will be). Free inode_imagic_map at the
end of pass 4.
pass2.c (check_dir_block, check_filetype): If the FILETYPE feature is
set, check the directory entry's filetype information field, and
fix/set it if necessary. (e2fsck_pass2): Free the inode_reg_map
bitmap at the end of pass 2.
pass1.c (e2fsck_pass1, alloc_imagic_map): Allocate and fill in
information for inode_reg_map and inode_imagic_map, which indicates
which inodes are regular files and AFS inodes, respectively.
Since only the master superblock is written during a restart, force
that superblock to be used after a restart; otherwise changes to the
block group descriptors end up getting ignored.
problem.c, problemP.h: If e2fsck is run -n, make def_yn variable be 0
for "no". Add support for a new flag, PR_NO_NOMSG, which supresses
the problem message if e2fsck is run with the -n option.
problem.c, problem.h (PR_2_SET_FILETYPE, PR_2_BAD_FILETYPE): Add new
problem codes.
message.c (expand_dirent_expression): Add support for %dt which prints
the dirent type information.
e2fsck.c (e2fsck_reset_context): Free new bitmaps (inode_reg_map and
inode_imagic_map).
e2fsck.h (e2fsck_t): Add new inode_reg_map and inode_magic_map to the
context structure.
ChangeLog, nt_io.c:
nt_io.c: New file which supports I/O under Windows NT.
ChangeLog, gen_uuid_nt.c:
gen_uuid_nt.c: New file which creates a UUID under Windows NT.
Many files:
Add support for non-Unix compiles
pass1b.c (clone_file_block): Don't clear the dup_map flag if the block
also shares data with the fs metadata when the count drops to 1, since
the block should still be cloned, as fs metadata isn't included in the
count.
ChangeLog, pass3.c:
pass3.c (adjust_inode_count): Fix bug where we didn't keep the
internal and external inode counts in sync when we decremented an
inode whose link count was already zero. Now we skip incrementing or
decrementing both link counts if we would cause an overflow condition.
(expand_dir, expand_dir_proc): Change where we update the inode block
count and size files so that the block count field is updated
correctly when we create an indirect block.
Add flushb to list of files which are removed when doing a make clean.
Add a distclean production which removes Makefile
Add the doc substree to the clean and distclean rules.
unix.c: Add support for calculating a progress bar if the -C0 option
is given. The function e2fsck_clear_progbar() clears the progress bar
and must be called before any message is issued. SIGUSR1 will enable
the progress bar, and SIGUSR2 will disable the progress bar. This is
used by fsck to handle parallel filesystem checks. Also, set the
device_name from the filesystem label if it is available.
e2fsck.h: Add new flags E2F_FLAG_PROG_BAR and E2F_FLAG_PROG_SUPRESS.
Add new field in the e2fsck structure which contains the last tenth of
a percent printed for the user.
message.c (print_e2fsck_message): Add call to e2fsck_clear_progbar().
pass1.c (e2fsck_pass1):
pass2.c (e2fsck_pass2):
pass3.c (e2fsck_pass3):
pass4.c (e2fsck_pass4):
pass5.c (e2fsck_pass5): Add call to e2fsck_clear_progbar when printing
the resource tracking information.
pass5.c (check_block_bitmaps, check_inode_bitmaps): If there is an
error in the bitmaps, suppress printing the progress bar using the
suppression flag for the remainder of the check, in order to clean up
the display.
MCONFIG.in (BUILD_CC):
configure.in (BUILD_CC): If cross compiling, find the native C
compiler and set it to BUILD_CC so that we can successfully build
util/subst.
ChangeLog, Makefile.in:
Makefile.in (subst): Build subst using $(BUILD_CC), since it's a
helper program which must be built using the native C compiler during
a cross-compilation.
Makefile.in:
Update dependencies.
e2fsck.h:
pass1.c (pass1_get_blocks, pass1_read_inode, pass1_write_inode,
pass1_check_directory, e2fsck_use_inode_shortcuts): Make pass1_* be
private static functions, and create new function
e2fsck_use_inode_shortcuts which sets and clears the inode shortcut
functions in the fs structure.
e2fsck.h:
pass2.c (e2fsck_process_bad_inode): Make process_bad_inode() an
exported function.
pass4.c (e2fsck_pass4): Call e2fsck_process_bad_inode to check if a
disconnected inode has any problems before connecting it to
/lost+found. Bug and suggested fix by Pavel Machek <pavel@bug.ucw.cz>
ChangeLog, swapfs.c:
swapfs.c (ext2fs_swap_inode): Add compatibility for Linux 2.3 kernels
that use i_generation instead of i_version. Patch supplied by Jon
Bright <sircus@sircus.demon.co.uk>.
ChangeLog, mke2fs.8.in:
mke2fs.8.in: Fix typo in man page which caused the badblocks command
to not show up in the "SEE ALSO" section.
ChangeLog, expect.1, expect.2, image.gz, name:
f_recnect_bad: New test which checks the case where a disconnect inode
also bad inode fields; we need to make sure e2fsck offers to fix the
inode (or clear the inode, as necessary).
dir_iterate.c (ext2fs_process_dir_block): Check for corrupted
directory entry before calling the callback function. This should
prevent some core dumps of insufficiently paranoid callback functions.
ChangeLog, unix.c:
unix.c (main): Add missing space in the disk write-protected message.
problem.c, problem.h (PR_0_INODE_COUNT_WRONG): Add new problem code.
super.c (check_super_block): Add check to make sure the total number
of inodes is sane, since this can be calculated from the number of
groups times the number of inodes per group. Offer to correct it if
it is incorrect.
util.c (print_resource_track): Use mallinfo if present to get more
accurate malloc statistics.
pass3.c (get_lost_and_found): Check to see if lost+found is a plain
fail; if so, offer to unlink it.
problem.c, problem.h (PR_3_LPF_NOTDIR): Add new problem code.
problem.c: Fix problem message for PR_1_BAD_GROUP_DESCRIPTORS so that
the block group number is printed. Add new prompt, PROMPT_UNLINK.
message.c (safe_print): New function which prints strings, converting
non-printable characters using the '^' and M-notation. This function
is now used to print directory name entries and pathnames.
ChangeLog:
Update for release of E2fsprogs 1.14.
unix.c (main): Reset the context before calling ext2fs_close(), to
avoid referencing already freed memory.
ChangeLog, llseek.c:
llseek.c (ext2fs_llseek): Change ext2fs_llseek() in the non-Linux case
to use EINVAL by default, unless it isn't defined, in which case we
use EXT2_ET_INVALID_ARGUMENT instead.
ChangeLog, mk_cmds.sh.in:
mk_cmds.sh.in: Fixed portability bug in shell script; we were
depending on a bash'ism.
ChangeLog, uuid.c:
uuid.c: Use asm/types.h instead of linux/types.h, to be consistent
with other locations where we've had to do this to work around glibc.
pass3.c (get_lost_and_found): If the filesystem is not opened
read-only, then force /lost+found to be created if it is not present.
problem.c: Allow PR_3_NO_LF_DIR to be handled during a preen operation.
ChangeLog, Makefile.in:
Makefile.in: Updated dependencies.
ChangeLog, fsck.c:
fsck.c (load_fs_info): Parse /etc/fstab ourselves, instead of relying
on getmntent(). This has the advantage of allowing us to properly
handle missing pass numbers correctly.
ChangeLog, configure.in:
configure.in: Add paths.h to header files for which we search.
tune2fs.8.in: Fix minor display bug in the nroff.
mke2fs.c (show_stats, write_inode_tables): Use the log10 function to
calculate the display of block numbers so that things look nice on an
80 character display.
mke2fs.c (usage): Add the sparse-super-flag to the usage message.
ChangeLog, e2fsck.c, pass1.c, pass2.c, problem.c, problem.h, unix.c:
unix.c (main): Move ext2fs_close() after e2fsck_free_context() since
e2fsck_free_context may reference data in ctx->fs.
e2fsck.c (e2fsck_reset_context): Make sure ctx->fs is non-NULL before
checking ctx->fs->dblist.
pass1.c (e2fsck_pass1): Use the device check subroutine on FIFO's and
Socket's, so that we catch bogus immutable inodes.
pass2.c (process_bad_inode): Process bad socket and fifo's.
problem.h, problem.c: Define new problem codes PR_2_BAD_FIFO and
PR_2_BAD_SOCKET.
problem.c: Add PR_3_NO_DIRINFO error code.
super.c (check_super_value): Rename min and max to min_val and max_val
to avoid possible cpp macro conflicts.
pass4.c (e2fsck_pass4): Rename max to maxgroup, to avoid possible cpp
macro conflicts.
pass3.c (e2fsck_pass3): Rename max to maxdirs, to avoid possible cpp
macro conflicts.
(check_directory): Fix logic to avoid possible core dump in the
case of ext2fs_get_dir_info returning NULL. (By the time we get here,
it should never happen, but...). Also simply/streamline the control
flow of the function.
unix.c (check_if_skip): Move the "not cleanly mounted" check ahead of
the maximal mount and too long since checked tests.
(reserve_stdio_fds): Make sure 0,1,2 file descriptors are open, so
that we don't open the filesystem using the same file
descriptor as stdout or stderr.
pass2.c (e2fsck_pass2): Fix the progress accounting so that we get to
100%.
pass3.c (e2fsck_pass3): Change progress accounting to be consistent
with the other e2fsck passes.
e2fsck.c (e2fsck_run): At the end of each pass, call the progress
function with the pass number set to zero.
unix.c (e2fsck_update_progress): If the pass number is zero, ignore
the call, since that indicates that we just want to deallocate any
progress structures.
emptydir.c:
Commit partially done file.
ChangeLog, badblocks.c:
badblocks.c (ext2fs_badblocks_list_add): Use a bigger increment than
10 blocks when we need to expand the size of the badblocks list.
badblocks.c (test_disk): Don't clear the existing bad blocks list when
using e2fsck -c, since it may cause blocks with marginal errors to be
dropped from the bad blocks list.
Add a -V option which displays the current version.
ChangeLog, unix.c:
unix.c (e2fsck_update_progress): Remove unused variables.
ChangeLog, inode.c:
inode.c (get_next_blockgroup): Fix bug where if get_next_blockgroup()
is called early because of a missing inode table in a block group, the
current_inode counter wasn't incremented correctly.
ChangeLog, tst_uuid.c:
tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter.
ChangeLog, test_icount.c:
test_icount.c (main): Fix main() declaration so that it returns int,
not void.
Many files:
fsck.c (ignore): Remove unused variable cp.
chattr.c (fatal_error):
tune2fs.c (usage):
lsattr.c (usage):
dumpe2fs.c (usage):
badblocks.c (usage): Remove volatile from declaration.
fsck.c: Change use of strdup to be string_copy, since we don't trust
what glibc is doing with strdup. (Whatever it is, it isn't pretty.)
pass1.c, problem.h: Change blkcnt_t to be e2_blkcnt_t to avoid
collision with LFS API.
pass1.c (e2fsck_pass1): Fix bug so that ext2_max_sizes is properly
initialized.
(e2fsck_pass1): Don't allow the the boot loader inode to be a
directory (clear the inode mode field if so).