Theodore Ts'o [Fri, 31 Aug 2001 01:55:26 +0000 (21:55 -0400)]
mke2fs.c (zap_sector): Now takes a third argument, which is how
many sectors to clear out. Fixed up Andreas's patch to
make it a bit more efficient/compact.
Andreas Dilger [Thu, 30 Aug 2001 21:39:04 +0000 (15:39 -0600)]
mke2fs.c (main): Zap the second sector of the disk, along with
any sectors in the same filesystem block after the superblock.
The latter will remove (for example) swapspace signatures
on 4kB+ blocksize filesystems. Also when zeroing the "end"
of the filesystem don't actually zero the start of a very
small device (less than 128kB).
Theodore Ts'o [Thu, 30 Aug 2001 20:42:09 +0000 (16:42 -0400)]
pass1.c (e2fsck_pass1): For EXT2_RESIZE_INO, allow its i_mode to
either be zero or a regular file (for compatibility with
Andreas's on-line resizing programs).
Andreas Dilger [Fri, 17 Aug 2001 09:48:11 +0000 (03:48 -0600)]
get_device_by_label.[ch], fsck.c, util.c: New interpret_spec()
function in get_device_by_label.c to allow the use of
UUID= or LABEL= when creating filesystems which use external
journal dev (e.g. mke2fs -J device=LABEL=<journal_label>).
tune2fs.c: Use superblock s_journal_uuid to locate an external
journal device instead of s_journal_dev when removing it.
Allow opening journal devices to set the label and UUID
in the ext2 superblock.
mke2fs.c, tune2fs.c: Free journal_device after use, as it is
malloc'd in interpret spec.
Theodore Ts'o [Wed, 15 Aug 2001 15:58:16 +0000 (11:58 -0400)]
mke2fs.c (PRS): Handle -O and -s options in line in the getopt
loop, so that -s and -O handling are a bit more intuitive.
(Not that they should be mixed anyway; -s is deprecated.)
Theodore Ts'o [Fri, 10 Aug 2001 23:13:11 +0000 (19:13 -0400)]
mke2fs.8.in: Slim down text describing the -O flag to remove
text that erroneously implied that all features
(including compatible flags) aren't compatible with older kernels.
Theodore Ts'o [Thu, 9 Aug 2001 08:14:04 +0000 (04:14 -0400)]
pass1.c, pass2.c, problem.c, problem.h: Fix bug introduced by
Andreas's symlink code; check_blocks() was unconditionally testing
inode_bad_map without checking to see if it existed first. Fixed
problem a different way; we now no longer check inode_bad_map at all,
since the file might not get deleted in pass 2 anyway. We move the
large file feature reconciliation code to to e2fsck_pass2(), and in
deallocate_inode() in pass2.c, we decrement the large files counter if
we're about to delete a large file.
Theodore Ts'o [Tue, 7 Aug 2001 14:17:41 +0000 (10:17 -0400)]
* journal.c (recover_ext3_journal): If s_errno is set in the
journal superblock, set the EXT2_ERROR_FS flag in the
filesystem superblock after the journal is run.
Andreas Dilger [Sat, 4 Aug 2001 07:47:01 +0000 (01:47 -0600)]
Change comments for %D and %d expansion in e2fsck problem codes. It
was not consistent which was for dirent expansion, and which was for
directory number expansion.
Andreas Dilger [Sat, 4 Aug 2001 06:51:18 +0000 (00:51 -0600)]
Add extra checks for bad symlinks, including zero length symlinks,
too long i_size for slow and fast symlinks, i_size_high set, multiple
blocks for slow symlinks.
tune2fs.c (update_feature_set, remove_journal_inode): If
removing an in-filesystem journal, clear out the journal
inode and update the filesystem accounting structures so
we don't have to run e2fsck to clean up after ourselves
unix.c (check_mount): Remove the code in e2fsck which tested for the
root filesystem being mounted read-only, and depend on the
results flags from ext2fs_check_if_mounted.
mkjournal.c (ext2fs_create_journal_superblock): Set the first block
usable in the journal for external journals to be 2 or 3,
depending on the blocksize, so that the existing kernel code
does the right thing.
getsize.c (ext2fs_get_device_size): Add support for the
BLKGETSIZE64 ioctl. (Ioctl defined by unofficial patches
from Ben LaHaise, but it's likely this interface won't
change.)
mkjournal.c (ext2fs_add_journal_device): Use the correct block
when writing the journal superblock, too. (Oops! Needed
to make 1k filesystems with external journal to work.)
This patch completes the initial extended attribute/ACL support for
e2fsck. We now check the entire EA block to make sure that the all
of the EA entries look sane.
Speed up journal recovery in userspace by avoiding a pointless
unconditional ext2_flush() call. Also made ext2_flush() more
efficient when the superblock is modified after the filesystem has
been flushed, and make it clear the superblock dirty flag
after doing the superblock/block group descriptor flush.
pass1b.c (pass1b, process_pass1b_block): Change the num_bad
field calculation so that it only counts EA block entries
as a single multiply claimed block (since once we clone
the EA blocks for one inode, we fix the problem for all of
the other inodes). Also, I moved the num_bad calculation
from process_pass1b_block to the end of pass1b. This
fixes a *significant* performance bug in pass1b which hit
people who had to had a lot of multiply claimed blocks.
(Can you say O(n**3) boys and girls? I knew you could...
Fortunately, this case didn't happen that much in actual practice.)
pass1.c (e2fsck_pass1): Defer inodes which have an extended attribute
block for later processing to avoid extra seeks across the disk.
(process_inode_cmp): If there is no indirect block, sort by the
extended attribute (i_file_acl) block.
pass1b.c (clone_file_block): Fix bugs when cloning extended attribute
blocks. Moved free of block_buf to after the code which clones the
extattr block, and fixed logic for changing pointers to the extended
attribute field in the inodes which were affected.
(decrement_badcount): New function which is used whenever we need to
decrement the number of files which claim a particular bad block.
Fixed bug where delete_file wasn't checking check_if_fs_block() before
clearing the entry in block_dup_map. This could cause a block which
was claimed by multiple files as well as the filesystem metadata to
not be completely fixed.