Whamcloud - gitweb
tools/e2fsprogs.git
13 years agoUpdate Release Notes, Changelogs, version.h, etc. for 1.41.13 release
Theodore Ts'o [Mon, 22 Nov 2010 21:10:23 +0000 (16:10 -0500)]
Update Release Notes, Changelogs, version.h, etc. for 1.41.13 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoDisable lazy inode table initialization when running regression tests
Theodore Ts'o [Mon, 22 Nov 2010 20:20:36 +0000 (15:20 -0500)]
Disable lazy inode table initialization when running regression tests

This avoids test failures when running on new kernels that allow lazy
itable initialization.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agomke2fs: Add discard option into mke2fs.conf
Lukas Czerner [Thu, 18 Nov 2010 13:38:41 +0000 (14:38 +0100)]
mke2fs: Add discard option into mke2fs.conf

Allow to specify discard in mke2fs.conf. Also change the way how to
specify default value for lazy_itable_init. It is better to have all
this defaulting done in the same place so do it in definition (as we do
with discard).

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agomke2fs: Deprecate -K option, introduce discard/nodiscard
Lukas Czerner [Thu, 18 Nov 2010 13:38:39 +0000 (14:38 +0100)]
mke2fs: Deprecate -K option, introduce discard/nodiscard

It would be nice to have consistent "discard" options in every system
tool (mount, fsck, mkfs) taking advantage of discards. Also "discard"
and "nodiscard" is more descriptive instead of just "-K" and can be
easily defaulted and it is something we can not do with "-K".

With this commit you need to specify extended option like this:

./mke2fs -T <fstype> -E nodiscard <device>

in order make a filesystem without discarding the device first. And

./mke2fs -T <fstype> -E discard <device>

respectively.

-K option is with this commit deprecated and should not be used anymore.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agomke2fs: Force the default blocksize to be at least the logical sector size
Theodore Ts'o [Mon, 22 Nov 2010 16:14:35 +0000 (11:14 -0500)]
mke2fs: Force the default blocksize to be at least the logical sector size

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agomke2fs: Set logical/physical sector size from environment for debugging
Theodore Ts'o [Mon, 22 Nov 2010 16:09:00 +0000 (11:09 -0500)]
mke2fs: Set logical/physical sector size from environment for debugging

If MKE2FS_DEVICE_SECTSIZE is set, then this will override the logical
sector size, which is the smallest sector size that can be written
atomically by the device.  (Previously MKE2FS_DEVICE_SECTSIZE set the
physical sector size, which was incorrect given its historical usage.)
The environment variable MKE2FS_DEVICE_PHYS_SECTSIZE will set the
physical sector size, which is the actual sector size used by the
device in reality.

The logical sector size is always less than or equal to the physical
sector size; and writes smaller than the physical sector size but
greather than or equal to the logical sector size will cause a
read-modify-write cycle within the device firmware (or in some
abstract layer lower than the Linux block I/O subsystem, at any rate).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agomke2fs: Fill in min_io and opt_io with physical sector size
Theodore Ts'o [Mon, 22 Nov 2010 15:50:42 +0000 (10:50 -0500)]
mke2fs: Fill in min_io and opt_io with physical sector size

If the device does not have an explicitly specified minimum io_size or
optimal io_size, and the physical sector size is greater than the
block size, then use the physical sector size as a better-than-nothing
hint.

This should help for SSD's that have a physical sector size of 8k or
16k (which are reportedly will be coming soon).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agomke2fs: Do not require -F for block size < physical size
Theodore Ts'o [Sun, 21 Nov 2010 14:56:53 +0000 (09:56 -0500)]
mke2fs: Do not require -F for block size < physical size

There will be SSD's out soon that have 8k or 16k phyiscal block sizes.
So don't enforce a requirement that the block size be less than the
physical block size unless the force option is given, and don't give a
warning if the user can't do anything about it (i.e., if the physical
block size is > than the page size).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agomke2fs: Enable lazy_itable_init if the kernel supports this feature
Theodore Ts'o [Fri, 1 Oct 2010 14:47:38 +0000 (10:47 -0400)]
mke2fs: Enable lazy_itable_init if the kernel supports this feature

Add check for /sys/fs/ext4/features/lazy_itable_init.  If this file
exists, it should be OK to skip initializing the inode table since the
kernel will do it at mount time.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agotune2fs.8: Document that the device can be specified via LABEL= or UUID=
Theodore Ts'o [Sun, 26 Sep 2010 01:41:21 +0000 (21:41 -0400)]
tune2fs.8: Document that the device can be specified via LABEL= or UUID=

Addresses-Debian-Bug: #580236

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoe2fsck: Open the external journal in exclusive mode
Theodore Ts'o [Sun, 26 Sep 2010 01:14:06 +0000 (21:14 -0400)]
e2fsck: Open the external journal in exclusive mode

This prevents accidentally replaying and resetting the journal while
it is mounted, due to an accidental attempt to run e2fsck on an LVM
snapshot of a file system with an external journal.

Addresses-Debian-Bug: #587531

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoresize2fs.8: Make it clear that power-of-2 units are meant by kilobytes
Theodore Ts'o [Sun, 26 Sep 2010 00:23:33 +0000 (20:23 -0400)]
resize2fs.8: Make it clear that power-of-2 units are meant by kilobytes

It's sad that this needs to be made clear....

Addresses-Debian-Bug: #594004

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agolibext2fs: Change EXT2_FLAG_DIRECT_IO to avoid conflict with devel branch
Theodore Ts'o [Sat, 25 Sep 2010 02:22:09 +0000 (22:22 -0400)]
libext2fs: Change EXT2_FLAG_DIRECT_IO to avoid conflict with devel branch

The development branch of e2fsprogs already has a code point assigned
in conflict with EXT2_FLAG_DIRECT_IO.  Fix this.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agodebugfs: Make the extents listing in the stat command more concise
Theodore Ts'o [Sat, 25 Sep 2010 02:05:58 +0000 (22:05 -0400)]
debugfs: Make the extents listing in the stat command more concise

Use "[u]" instead of "[uninit]" and limit the amount of detail printed
for the extent tree blocks, so it is more similar to the format used
for direct/indirect mapped inodes.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agodebugfs: Add the -D option to request Direct I/O
Theodore Ts'o [Fri, 24 Sep 2010 14:12:54 +0000 (10:12 -0400)]
debugfs: Add the -D option to request Direct I/O

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoext2fs: Optimize for Direct I/O
Theodore Ts'o [Fri, 24 Sep 2010 14:06:45 +0000 (10:06 -0400)]
ext2fs: Optimize for Direct I/O

Allocate various memory structures to be properly aligned to avoid
needing to use a bounce buffer when doing direct I/O read/writes.
This should also help on FreeBSD systems which require aligned buffers
unconditionally.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoext2fs: Add Direct I/O support to the ext2fs library
Theodore Ts'o [Fri, 24 Sep 2010 14:02:25 +0000 (10:02 -0400)]
ext2fs: Add Direct I/O support to the ext2fs library

This adds the basic support for Direct I/O to unix_io.c, and adds a
new flag EXT_FLAG_DIRECT_IO which can be passed to ext2fs_open() or
ext2fs_open2() to request Direct I/O support.

Note that device mapper devices in Linux don't support Direct I/O, and
in some circumstances using Direct I/O can actually make performance
*worse*!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agolibext2fs: Fix memory leak in the Unix I/O layer when changing block size
Theodore Ts'o [Thu, 23 Sep 2010 17:06:31 +0000 (13:06 -0400)]
libext2fs: Fix memory leak in the Unix I/O layer when changing block size

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoext2fs: add ext2fs_get_memalign() function
Theodore Ts'o [Thu, 23 Sep 2010 16:56:46 +0000 (12:56 -0400)]
ext2fs: add ext2fs_get_memalign() function

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agomke2fs: make "invalid blocks count" error more clear
Eric Sandeen [Thu, 12 Aug 2010 18:40:44 +0000 (14:40 -0400)]
mke2fs: make "invalid blocks count" error more clear

Mistakes on the commandline can lead to odd error messages:

# mke2fs -t ext4 -E stride=128 stripe-width=512 /dev/sda1
mke2fs: invalid blocks count - /dev/sda1

Making it a bit more explicit is more obvious:

mke2fs: invalid blocks count '/dev/sda1' on device 'stripe-width=512'

(hint, the mistake was no comma separation for -E)

Reported-by: Adam Huffman <bloch@verdurin.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 years agomke2fs: use lazy inode init on some discard-able devices
Eric Sandeen [Fri, 20 Aug 2010 21:41:14 +0000 (16:41 -0500)]
mke2fs: use lazy inode init on some discard-able devices

If a device supports discard -and- returns 0s for discarded blocks,
then we can skip the inode table initialization -and- the inode table
zeroing at mkfs time, and skip the lazy init as well since they are
already zeroed out.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 years agoe2fsck: Improve error message when device name misspelled
Jan Kara [Wed, 8 Sep 2010 14:12:08 +0000 (16:12 +0200)]
e2fsck: Improve error message when device name misspelled

When a device name is misspelled, we output the full text about specifying
alternate superblock. This is slightly misleading because when the device
cannot be open because of ENOENT, this certainly won't help. So just print
that device does not exist and exit.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 years agodebugfs: Display the extent tree blocks in the stat command output
Theodore Ts'o [Mon, 20 Sep 2010 02:52:09 +0000 (22:52 -0400)]
debugfs: Display the extent tree blocks in the stat command output

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agotune2fs, debugfs, libext2fs: Add support for ext4 default mount options
Theodore Ts'o [Sat, 18 Sep 2010 23:38:22 +0000 (19:38 -0400)]
tune2fs, debugfs, libext2fs: Add support for ext4 default mount options

Add support for 2.6.35's new default mount options which can be
specified in the superblock.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agobadblocks: Deal with UTF-8 characters in progress message
Theodore Ts'o [Mon, 2 Aug 2010 02:30:33 +0000 (22:30 -0400)]
badblocks: Deal with UTF-8 characters in progress message

Addresses-Gentoo-Bug: #309909
Addresses-Debian-Bug: #583782
Addresses-Debian-Bug: #587834

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agomke2fs: fix mke2fs "invalid inode ratio" error message
Tim Small [Sat, 31 Jul 2010 00:43:11 +0000 (20:43 -0400)]
mke2fs: fix mke2fs "invalid inode ratio" error message

Make error message consistent with the validity test.

Signed-off-by: Tim Small <tim@seoss.co.uk>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agomke2fs.8.in: clarify the sign of a block-size constraint.
Eric Sandeen [Thu, 29 Jul 2010 16:59:42 +0000 (11:59 -0500)]
mke2fs.8.in: clarify the sign of a block-size constraint.

This bit of the mke2fs manpage is slightly confusing:

-b block-size
    Specify the size of blocks in bytes. <snip>
    If block-size is negative, then mke2fs will use heuristics
    to determine the appropriate block size, with the constraint
    that the block size will be at least block-size bytes.

because it sounds like the block size will be at least a negative
number.  Clarify just what the negative sign means.

Reported-by: Chris Frost <chris@frostnet.net>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 years agodebian: Fix outdated description: /sbin/fsck has moved to util-linux
Theodore Ts'o [Mon, 19 Jul 2010 06:27:07 +0000 (02:27 -0400)]
debian: Fix outdated description: /sbin/fsck has moved to util-linux

Addresses-Debian-Bug: #588726

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoresize2fs.8: Update man page to indicate ext4 supports on-line resize
Theodore Ts'o [Mon, 19 Jul 2010 06:23:12 +0000 (02:23 -0400)]
resize2fs.8: Update man page to indicate ext4 supports on-line resize

Addresses-Debian-Bug: #589345

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoresize2fs: relax requirements for -P output a bit
Eric Sandeen [Mon, 12 Jul 2010 18:27:44 +0000 (13:27 -0500)]
resize2fs: relax requirements for -P output a bit

Requiring an immediate pre-fsck before printing a minimum
resize size seems a bit draconian; if the fs isn't clean or marked
with error, then certainly, but for an informational minimum
size, I don't think we need to require a fsck since last mount.

I had simply copied the checks from the actual resize path,
previously.

Installers use this option (-P) to gather minimum resize info,
and requiring an actual fsck before use just seems to go too far.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 years agodebian: Remove obsolete initrd script
Theodore Ts'o [Tue, 6 Jul 2010 18:08:09 +0000 (14:08 -0400)]
debian: Remove obsolete initrd script

Addresses-Debian-Bug: #585041

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoe2fsck, resize2fs: fix a fp precision error that can lead to a seg fault
Theodore Ts'o [Tue, 6 Jul 2010 00:40:41 +0000 (20:40 -0400)]
e2fsck, resize2fs: fix a fp precision error that can lead to a seg fault

Commit 641b66b fixed a floating point precision error which can result
in a search algorithm looping forever.  It can also result in an array
index being out of bounds and causing a segfault.  Here are two more
cases in e2fsck and resize2fs that need to be fixed.  I've just used
the same fix from the that commit.

Signed-off-by: Lachlan McIlroy <lmcilroy@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoe2fsck: Add missing ext2fs_close() call when going back to original superblock
Theodore Ts'o [Mon, 5 Jul 2010 19:06:37 +0000 (15:06 -0400)]
e2fsck: Add missing ext2fs_close() call when going back to original superblock

In the case where the original superblock and the backup superblock
are both invalid in some way, e2fsck will try to go back to the
orignal superblock.  To do that, it must close the attempted open
using the backup superblock first (since otherwise the exclusive open
will prevent the subsequent open from succeding).

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoe2freefrag: Fix getopt bug on machines with unsigned chars
Mike Frysinger [Tue, 5 Jan 2010 04:15:32 +0000 (23:15 -0500)]
e2freefrag: Fix getopt bug on machines with unsigned chars

The getopt() function returns an int, not a char.  On systems where the
default char is unsigned (like ppc), we get weird behavior where -1 is
truncated to 0xff but compared to (int)-1.

Also fix this same bug for two test programs, test_rel and iscan,
which aren't currently used at the moment.

Addresses-Gentoo-Bug: #299386

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 years agoe2freefrag: Display the total number of free extents
Theodore Ts'o [Mon, 5 Jul 2010 18:51:47 +0000 (14:51 -0400)]
e2freefrag: Display the total number of free extents

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoEnhance tst_super_size so that it checks the superblock fields as well
Theodore Ts'o [Mon, 5 Jul 2010 18:50:17 +0000 (14:50 -0400)]
Enhance tst_super_size so that it checks the superblock fields as well

The test now checks to make sure the superblock fields are correctly
aligned and prints them out so they can be manually checked to make
sure they are where we expect them to be.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoAdd superblock fields which track first and most recent fs errors
Theodore Ts'o [Fri, 25 Jun 2010 14:53:13 +0000 (10:53 -0400)]
Add superblock fields which track first and most recent fs errors

Add superblock fields which track where and when the first and most
recent file system errors occured.  These fields are displayed by
dumpe2fs and cleared by e2fsck.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoFix Makefile dependencies for test programs in lib/ext2fs
Theodore Ts'o [Fri, 25 Jun 2010 01:11:01 +0000 (21:11 -0400)]
Fix Makefile dependencies for test programs in lib/ext2fs

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoAdd support for Next3 snapshot superblock fields to dumpe2fs and debugfs
Theodore Ts'o [Fri, 25 Jun 2010 01:08:37 +0000 (21:08 -0400)]
Add support for Next3 snapshot superblock fields to dumpe2fs and debugfs

We also support for byte-swapping the Next3 fields, although the
current Next3 implementation doesn't support big-endian systems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agopo: update zh_CN.po (from translationproject.org)
Theodore Ts'o [Mon, 7 Jun 2010 16:25:11 +0000 (12:25 -0400)]
po: update zh_CN.po (from translationproject.org)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agopo: update vi.po (from translationproject.org)
Theodore Ts'o [Mon, 7 Jun 2010 16:24:43 +0000 (12:24 -0400)]
po: update vi.po (from translationproject.org)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agopo: update de.po (from translationproject.org)
Theodore Ts'o [Mon, 7 Jun 2010 16:24:21 +0000 (12:24 -0400)]
po: update de.po (from translationproject.org)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agopo: update sv.po (from translationproject.org)
Göran Uddeborg [Mon, 7 Jun 2010 16:21:46 +0000 (12:21 -0400)]
po: update sv.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Mon, 7 Jun 2010 16:21:46 +0000 (12:21 -0400)]
po: update pl.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Mon, 7 Jun 2010 16:21:46 +0000 (12:21 -0400)]
po: update nl.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update id.po (from translationproject.org)
Arif E. Nugroho [Mon, 7 Jun 2010 16:21:46 +0000 (12:21 -0400)]
po: update id.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update fr.po (from translationproject.org)
Samuel Thibault [Mon, 7 Jun 2010 16:21:46 +0000 (12:21 -0400)]
po: update fr.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update cs.po (from translationproject.org)
Petr Pisar [Mon, 7 Jun 2010 16:21:46 +0000 (12:21 -0400)]
po: update cs.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agoUpdate debian/changelog for v1.41.12-2 release debian-1.41.12-2
Theodore Ts'o [Thu, 3 Jun 2010 15:52:02 +0000 (11:52 -0400)]
Update debian/changelog for v1.41.12-2 release

14 years agoFix debian problem: e2fsprogs: bogus dependency on libblkid1 due to shlibs.local
Theodore Ts'o [Thu, 3 Jun 2010 15:50:42 +0000 (11:50 -0400)]
Fix debian problem: e2fsprogs: bogus dependency on libblkid1 due to shlibs.local

Addresses-Debian-Bug: #583551

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoReserve feature flags and fields needed for the Next3 snapshot feature
Theodore Ts'o [Wed, 2 Jun 2010 14:35:45 +0000 (10:35 -0400)]
Reserve feature flags and fields needed for the Next3 snapshot feature

The documentation is not (as of this writing) fully complete, but
there is some documentation here:

http://sourceforge.net/apps/mediawiki/next3/index.php?title=Code_documentation
http://sourceforge.net/apps/mediawiki/next3/index.php?title=On-disk_format
http://sourceforge.net/projects/next3/files/Next3_Snapshots.pdf/download

... which will hopefully be updated soon to be fully up to date with
these assignments and more details about how things work.

For now, the assignments should avoid collisions with other new work
that people might want to do on ext3/4.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoReserve the EXT4_FEATURE_INCOMPAT_DIRDATA feature flag
Andreas Dilger [Wed, 2 Jun 2010 02:21:42 +0000 (22:21 -0400)]
Reserve the EXT4_FEATURE_INCOMPAT_DIRDATA feature flag

Reserve the EXT4_FEATURE_INCOMPAT_DIRDATA feature flag for adding
extra file data in ext2_dir_entry_2 entries.

This changes the on-disk layout in the following way.

Firstly, the ext2_dir_entry_2 file_type field now has a mask: that
limits the "filetype" information to the low 4 bits of this field.
Since these values are sequentially assigned, this allows for up to 7
more filetypes to be assigned.  When reading the "filetype" field, the
high 4 bits should be masked off when converting to DT_* filetypes for
userspace.

The high 4 bits of "filetype" are used as a bitmask to register up to
4 different "extended" directory entry fields.  Extended data fields
are packed without alignment into the directory entry after the "name"
field in order of increasing bitmask value, for each field where bit
is set.  In order to avoid the need to "understand" each of the
extended fields, the first byte of each extended data field holds the
size of that data field (including the size itself), so they can be
skipped if not understood.  For fields that change the semantics of
the filesystem it is expected that a separate ROCOMPAT or INCOMPAT
field is registered.

There is a single dirent data type defined currently, for Lustre:
which holds a 128-bit file identifier.  It is expected that if there
are 64-bit inode values that this will be assigned the 0x20 value.

Should a need ever arise to use all 4 of the extended dirent data
fields, it would be possible to keep the last bit (0x80) for use as a
multiplexor that stores a 1-byte aggregate data size, then a series of
"<u8_size><u8_type><data>" records in the last extended data record.
It is not expected that this will actually be needed in the lifetime
of ext4.

Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoReserve the EXT4_INCOMPAT_EA_INODE feature flag
Andreas Dilger [Wed, 2 Jun 2010 02:20:22 +0000 (22:20 -0400)]
Reserve the EXT4_INCOMPAT_EA_INODE feature flag

Reserve the EXT4_INCOMPAT_EA_INODE feature flag for use with
large extended attributes that are stored in a separate inode.
This changes the on-disk format in several ways:

First, replace the e_value_block field with e_value_inum, so that
an xattr entry can reference an external inode.  This field is
currently unused, as all of the entries live in the same block.

struct ext2_ext_attr_entry {
  __u8 e_name_len; /* length of name */
  __u8 e_name_index; /* attribute name index */
  __le16 e_value_offs; /* offset in disk block of value */
> __le32 e_value_inum; /* inode in which the value is stored */
  __le32 e_value_size; /* size of attribute value */
  __le32 e_hash; /* hash value of name and value */
  char e_name[0]; /* attribute name */
}

Second, add a flag to the inode that indicates it is using a large
(external) extended attribute.  This is needed so that when unlinking
an inode the xattrs will be scanned to unlink the xattr inodes
referenced by the main inode.

Third, for inodes that have a number of xattrs that are larger than
a single block, but not large enough to justify an external inode
(less than 64kB total xattr size, due to e_value_offs limitation)
the ext2_ext_attr_header->h_blocks field can grow beyond a single
block to represent a contiguous allocation of blocks for the xattr.

Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agolibext2fs: Remove #include of <linux/types.h> from fiemap.h
Theodore Ts'o [Mon, 31 May 2010 22:50:50 +0000 (18:50 -0400)]
libext2fs: Remove #include of <linux/types.h> from fiemap.h

The system header file can end up causing type conflicts, and
including kernel header files is always dodgy/dangerous (and this case
not needed).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoFix minor nit in debian/rules file
Theodore Ts'o [Wed, 26 May 2010 15:01:06 +0000 (11:01 -0400)]
Fix minor nit in debian/rules file

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: correct test for EOFBLOCKS
Eric Sandeen [Wed, 19 May 2010 18:20:13 +0000 (13:20 -0500)]
e2fsck: correct test for EOFBLOCKS

This test, added to e2fsprogs-1.41.12, is backwards.

If EOFBLOCKS is set, then the size -should- be less than
the last physical block...

xfstests 013 caught this.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agotune2fs: Enable uninit_bg to be set without requiring an fsck
Theodore Ts'o [Wed, 19 May 2010 16:14:39 +0000 (12:14 -0400)]
tune2fs: Enable uninit_bg to be set without requiring an fsck

Allow the uninit_bg feature to be set without requiring an fsck.  The
first full fsck will require scanning all of the inode table blocks,
but subsequent fsck's will be fast.  This allows flexibility over
requiring a full fsck after setting this feature, which is what
tune2fs previously mandated.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoClean up "last commit" comment in RELEASE-NOTES
Theodore Ts'o [Tue, 18 May 2010 04:14:21 +0000 (00:14 -0400)]
Clean up "last commit" comment in RELEASE-NOTES

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoUpdate release notes, version string, etc. for e2fsprogs 1.41.12 release v1.41.12
Theodore Ts'o [Tue, 18 May 2010 03:54:49 +0000 (23:54 -0400)]
Update release notes, version string, etc. for e2fsprogs 1.41.12 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoFix dpkg-buildpackage -j2
Theodore Ts'o [Tue, 18 May 2010 03:48:52 +0000 (23:48 -0400)]
Fix dpkg-buildpackage -j2

Add a dependency on subs to all-libs-recursive and all-progs-recursive
to dpkg-buildpackage -j2, since it builds make target 'libs'
explicitly, and we need to make sure the 'subs' target is run first.

Addresses-Debian-Bug: #563487

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoUpdate e2fsprogs translation template for 1.41.12 release
Theodore Ts'o [Tue, 18 May 2010 00:03:18 +0000 (20:03 -0400)]
Update e2fsprogs translation template for 1.41.12 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: Don't set the group descriptor checksums if the fsck was cancelled
Theodore Ts'o [Tue, 18 May 2010 02:54:06 +0000 (22:54 -0400)]
e2fsck: Don't set the group descriptor checksums if the fsck was cancelled

It's a bad idea to set the checksums if e2fsck is aborted by the user,
and it often causes an error message, "Inode bitmap not loaded while
setting block group checksum info".

Addresses-Launchpad-Bug: #582035

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agomke2fs: account for physical as well as logical sector size
Theodore Ts'o [Tue, 18 May 2010 02:31:45 +0000 (22:31 -0400)]
mke2fs: account for physical as well as logical sector size

Some devices, notably 4k sector drives, may have a 512 logical
sector size, mapped onto a 4k physical sector size.

When mke2fs is ratcheting down the blocksize for small filesystems,
or when a blocksize is specified on the commandline, we should not
willingly go below the physical sector size of the device.

When a blocksize is specified, we -must- not go below
the logical sector size of the device.

Add a new library function, ext2fs_get_device_phys_sectsize()
to get the physical sector size if possible, and adjust the
logic in mke2fs to enforce the above rules.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agolibe2p, libext2fs: Update file copyright permission states to match COPYING
Theodore Ts'o [Tue, 18 May 2010 01:31:56 +0000 (21:31 -0400)]
libe2p, libext2fs: Update file copyright permission states to match COPYING

The top-level COPYING file states that the e2p and ext2fs libraries
are available under the LGPLv2.  The files were incorrectly labelled.
Alex Thomas/Luster has been consulted wrt to the ext3_extents.h file;
the rest of the files were primarily authored by Theodore Ts'o.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agomke2fs: Fix compile warning message
Theodore Ts'o [Tue, 18 May 2010 00:05:13 +0000 (20:05 -0400)]
mke2fs: Fix compile warning message

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoInstall fsck.ext4 symlink in e2fsprogs-udeb package
Theodore Ts'o [Mon, 17 May 2010 23:38:31 +0000 (19:38 -0400)]
Install fsck.ext4 symlink in e2fsprogs-udeb package

Addresses-Debian-Bug: #571247

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoAlways build namei.o so that building with "configure --disable-debugfs" works
Theodore Ts'o [Mon, 17 May 2010 23:32:19 +0000 (19:32 -0400)]
Always build namei.o so that building with "configure --disable-debugfs" works

namei.o is also needed by e2initrd_helper.

Long term, if we care about reduced e2fsprogs builds, we need a more
general solution for deciding what .o files are needed for a
particular build.  Given that install floppies are going (gone?) the
way the dodo bird, we probably don't care, though.

Addresses-Sourceforge-Bug: #2911433

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoAdd configure options --enable-symlink-build and --enable-symlink-install
Theodore Ts'o [Mon, 17 May 2010 23:21:42 +0000 (19:21 -0400)]
Add configure options --enable-symlink-build and --enable-symlink-install

These options allow e2fsprogs to be built using symlinks instead of
hard links, and to be installed using symlinks instead of hard links,
respectively.

Addresses-Sourceforge-Bug: #1436294

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agolibcom_err: Only output ^M when tty is in raw mode
Theodore Ts'o [Sat, 15 May 2010 11:48:25 +0000 (07:48 -0400)]
libcom_err: Only output ^M when tty is in raw mode

This fixes a long-standing botch in the com_err library, and solves a
regression test problem for libss that gets tickled by source code
management systems (like Perforce) that don't preserve CRLF line
endings with fidelity.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agotests: Use our own mke2fs.conf file
Theodore Ts'o [Sat, 15 May 2010 00:18:11 +0000 (20:18 -0400)]
tests: Use our own mke2fs.conf file

Use a standard, fixed mke2fs.conf file so that if downstream
distributions want to change the mke2fs.conf which is distributed in
the RPM or dpkg file, it won't screw up the regression tests.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: Explicitly reject extents that begin at physical block 0 as illegal
Theodore Ts'o [Fri, 14 May 2010 22:03:14 +0000 (18:03 -0400)]
e2fsck: Explicitly reject extents that begin at physical block 0 as illegal

In the case where s_first_data_block is 1, we need to explictly reject
an extent whose starting physical block is zero.

Thanks to Jiaying Zhang <jiayingz@google.com> for finding this bug.

Addresses-Google-Bug: #2573806

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: Fix segmentation fault when checking a file system
Theodore Ts'o [Wed, 17 Mar 2010 17:32:52 +0000 (13:32 -0400)]
e2fsck: Fix segmentation fault when checking a file system

If a corrupted file system causes us to want to delete an extent, and
that causes us to want to release a block in e2fsck pass #1, it would
be preferable if e2fsck didn't seg fault.  This tends to get users
craky, as users are wont to do.  :-)

Thanks to Dirk Reiners for reporting this bug:

e2fsck crashes fixing a corrupted 3.5 TB filesystem:

0x0000000000432002 in ext2fs_unmark_generic_bitmap (bitmap=0x0, bitno=623386749)
at gen_bitmap.c:183
183             if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
(gdb) bt
bitno=623386749) at gen_bitmap.c:183
block=623386749) at ../../lib/ext2fs/bitops.h:319
inuse=-1) at alloc_stats.c:78
extent.c:1509
pb=0x7fffffffdfe0, start_block=0, ehandle=0x6dcf50) at pass1.c:1709
pb=0x7fffffffdfe0, start_block=0, ehandle=0x6dcf50) at pass1.c:1737
pctx=0x7fffffffe100, pb=0x7fffffffdfe0) at pass1.c:1842
block_buf=0x6c4330 "\373\212#") at pass1.c:1920

The source of the NULL bitmap is fs on stack frame 2:

(gdb) up 2
inuse=-1) at alloc_stats.c:78
78                      ext2fs_unmark_block_bitmap(fs->block_map, blk);

Addresses-SourceForge-Bug: #2971800

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: Skip time-based checks if the time looks insane or broken_system_clock
Theodore Ts'o [Thu, 13 May 2010 21:36:36 +0000 (17:36 -0400)]
e2fsck: Skip time-based checks if the time looks insane or broken_system_clock

There are broken embedded devices that have system clocks that always
reset to January 1, 1970 whenever they boot (even if no power is
lost).  There are also systems that have super cheap clock crystals
that can be very inaccurate.  So if the option broken_system_clock is
given, disable all time based checks.  E2fsck will also try to detect
incorrect system clock times, and automatically mark the system clock
as insane.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: make block counting variable in pass1 64 bits
Eric Sandeen [Tue, 30 Mar 2010 16:42:51 +0000 (11:42 -0500)]
e2fsck: make block counting variable in pass1 64 bits

Justin reported that creating a 4T file with posix_fallocate led
to fsck errors:

e2fsck 1.41.10 (10-Feb-2009)
Pass 1: Checking inodes, blocks, and sizes
Inode 12, i_blocks is 8589935432, should be 840.  Fix? yes

This looks like a 32-bit overflow.

commmit 8a8f36540bbf5d4397cf476e216e9a720b5c1d8e added handling of
the high i_blocks number, but we accumulate blocks in the num_blocks
field, and that's still just 32 bits.

Note: we don't need to expand max_blocks for now, that's only used
in the non-extents case, and those files have smaller max sizes.

I haven't been able to replicate the problem, oddly, but Justin
reports that this patch fixed his situation.

Reported-by: Justin Maggard <jmaggard10@gmail.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agoe2fsck: mark sparse journal as invalid
Eric Sandeen [Mon, 12 Apr 2010 22:36:33 +0000 (17:36 -0500)]
e2fsck: mark sparse journal as invalid

For a filesystem that fails with:

journal_bmap: journal block not found at offset 7334 on loop0
JBD: bad block at offset 7334

e2fsck won't actually fix this; it will mark the fs as clean,
so it will mount, but it does not fix that block, and when the
journal reaches this point again it will fail again.

The following simple change to process_journal_block() might be
a little drastic; it will clear & recreate the journal inode if
it's sparse - i.e. if it gets block 0.

I suppose we could be more complicated and try to replay the journal
up to the error, but I'm not sure it's worth it since we're fscking
it anyway.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agoe2fsck: Fix a number of problems that were inappropriately using PROMPT_ABORT
Theodore Ts'o [Wed, 12 May 2010 22:58:53 +0000 (18:58 -0400)]
e2fsck: Fix a number of problems that were inappropriately using PROMPT_ABORT

There were a number of problems that were prompting the user whether
or not to ABORT, but then would abort regardless of whether the user
answered yes or no.  Change those to be PROMPT_NONE, PR_FATAL.

Also, fix PR_1_RESIZE_INODE_CREATE so that it recovers appropriately
after failing to create the resize inode.  This problem now uses
PROMPT_CONTINUE instead of PROMPT_ABORT, and if the user says, "no",
the code will abort.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agomke2fs: be explicit if external journal device is not found
Eric Sandeen [Thu, 1 Apr 2010 19:26:30 +0000 (14:26 -0500)]
mke2fs: be explicit if external journal device is not found

This for RH bug #572935 -
RFE: Misleading error message from mke2fs -J option

If the journal device UUID is typo'd or otherwise not found,
the error message looks like it's a usage() type of problem.

It'd be helpful to explicitly say that the device requested
could not be found.

Addresses-Red-Hat-Bug: #572935

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agoresize2fs: don't print minimum size if fs is not clean
Eric Sandeen [Wed, 31 Mar 2010 19:28:42 +0000 (14:28 -0500)]
resize2fs: don't print minimum size if fs is not clean

Right now, resize2fs -P on a dirty filesystem will give you a number;
however, it's probably wrong if the fs is not clean:

# resize2fs -P myimage.img
resize2fs 1.41.9 (22-Aug-2009)
Estimated minimum size of the filesystem: 75623

# e2fsck -fy myimage.img
e2fsck 1.41.9 (22-Aug-2009)
myimage.img: recovering journal
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

myimage.img: ***** FILE SYSTEM WAS MODIFIED *****
myimage.img: 9530/53760 files (0.1% non-contiguous), 24737/98304 blocks

# resize2fs -P myimage.img
resize2fs 1.41.9 (22-Aug-2009)
Estimated minimum size of the filesystem: 32165

We should issue the same "Please run e2fsck ..." message for
-P as we do for an actual resize request.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agotests: Add new test f_unused_itable
Theodore Ts'o [Wed, 12 May 2010 01:10:12 +0000 (21:10 -0400)]
tests: Add new test f_unused_itable

Add test to make sure e2fsck doesn't end up detaching and sending to
lost+found inodes which are in an bg_itable_unused_region (e.g. if
there was a power failure and bg_itable_unused wasn't updated because
journaling wasn't enabled).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: Don't clear inodes if we found inodes that are in the unused region
Theodore Ts'o [Tue, 11 May 2010 19:12:52 +0000 (15:12 -0400)]
e2fsck: Don't clear inodes if we found inodes that are in the unused region

Commit 6267ee4 avoided repeating pass #1 over and over again if
multiple block groups are found with inodes in the bg_itable_unused
region during pass #2.  This caused a regression because the problem
with not restarting pass #1 right away is that e2fsck will offer to
clear directory entries for inodes that are deleted, and e2fsck can't
easily distinguish between deleted inodes and inodes that were skipped
because of an incorrect bg_itable_unused value.  So once an inode is
found in an unused region and we know that we're going to restart the
e2fsck pass, don't offer to clear any deleted inodes --- since those
will be caught in the second round.

Addresses-Google-Bug: #2642165

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agomke2fs: Allow a flex_bg size of 1
Theodore Ts'o [Tue, 11 May 2010 01:49:58 +0000 (21:49 -0400)]
mke2fs: Allow a flex_bg size of 1

It's unusual, and rarely needed, but it's legal value.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: Check for cases where EOFBLOCKS_FL is unnecessarily set
Theodore Ts'o [Mon, 10 May 2010 14:17:44 +0000 (10:17 -0400)]
e2fsck: Check for cases where EOFBLOCKS_FL is unnecessarily set

Some kernels will crash if EOFBLOCKS_FL is set when it is it not
needed, and this if it is left set when it isn't needed, it is a sign
of a kernel bug.

Addresses-Google-Bug: #2604224

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agopo: update cs.po (from translationproject.org)
Petr Pisar [Thu, 6 May 2010 18:49:49 +0000 (14:49 -0400)]
po: update cs.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update zh_CN.po (from translationproject.org)
Dark Raven [Mon, 19 Apr 2010 20:59:03 +0000 (16:59 -0400)]
po: update zh_CN.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update vi.po (from translationproject.org)
Clytie Siddall [Mon, 19 Apr 2010 20:59:03 +0000 (16:59 -0400)]
po: update vi.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Mon, 19 Apr 2010 20:59:03 +0000 (16:59 -0400)]
po: update pl.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Mon, 19 Apr 2010 20:59:03 +0000 (16:59 -0400)]
po: update nl.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update id.po (from translationproject.org)
Arif E. Nugroho [Mon, 19 Apr 2010 20:59:03 +0000 (16:59 -0400)]
po: update id.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update fr.po (from translationproject.org)
Samuel Thibault [Mon, 19 Apr 2010 20:59:03 +0000 (16:59 -0400)]
po: update fr.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agopo: update de.po (from translationproject.org)
Philipp Thomas [Mon, 19 Apr 2010 20:59:02 +0000 (16:59 -0400)]
po: update de.po (from translationproject.org)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
14 years agoRevert "e2fsck: fix spurious complaints about i_size caused by preallocated blocks"
Theodore Ts'o [Thu, 8 Apr 2010 19:51:10 +0000 (15:51 -0400)]
Revert "e2fsck: fix spurious complaints about i_size caused by preallocated blocks"

This reverts commit 0ea910997b3c2ba09b65b852b9bb4dd7b4d68999.

Since the Linux kernel now has support for the EXT4_EOFBLOCKS_FL flag
starting in 2.6.34, we don't need this workaround any more.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoUpdate release notes, version string, etc. for e2fsprogs 1.41.11 release v1.41.11
Theodore Ts'o [Mon, 15 Mar 2010 04:57:42 +0000 (00:57 -0400)]
Update release notes, version string, etc. for e2fsprogs 1.41.11 release

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agodebian: Update compliance to debian policy to 3.8.4
Theodore Ts'o [Mon, 15 Mar 2010 04:56:58 +0000 (00:56 -0400)]
debian: Update compliance to debian policy to 3.8.4

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agodebian: static build no longer needs -fno-stack-protector
Theodore Ts'o [Mon, 15 Mar 2010 04:14:46 +0000 (00:14 -0400)]
debian: static build no longer needs -fno-stack-protector

From: Kees Cook <kees@debian.org>

I noticed that the debian/rules contains "-fno-stack-protector".  While
this used to be needed a while back, this is no longer required, as the
stack protection code will be statically compiled into the static e2fsprogs
correctly now.

Addresses-Debian-Bug: #573923

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agotests: Add new test f_rehash_dir
Theodore Ts'o [Mon, 15 Mar 2010 03:40:55 +0000 (23:40 -0400)]
tests: Add new test f_rehash_dir

Add a new test which tests to make sure e2fsck -D works correctly.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agolibcom_err: Add support for Heimdal com_right_r function()
Theodore Ts'o [Sun, 14 Mar 2010 23:34:53 +0000 (19:34 -0400)]
libcom_err: Add support for Heimdal com_right_r function()

Addresses-Sourceforge-Bug: #2963865
Addresses-Debian-Bug: #558910

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: Don't blow up if the physical device is too big
Theodore Ts'o [Sun, 14 Mar 2010 23:26:48 +0000 (19:26 -0400)]
e2fsck: Don't blow up if the physical device is too big

If the user grows a partition bigger than 2**32 blocks, e2fsprogs
1.41.x is not going to be able to support resizing the filesystem,
since it doesn't have > 2**32 block support.  However, e2fsck should
still work, so the system administrator doesn't get stuck.

Addresses-Launchpad-Bug: #521648

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agodebugfs: Correctly show the allocation status of a block using logdump
Theodore Ts'o [Sun, 14 Mar 2010 23:02:57 +0000 (19:02 -0400)]
debugfs: Correctly show the allocation status of a block using logdump

The offset in the bitmap was not getting correctly calculated when the
user specifics a block to track using "logdump -b <block-num>"

Addresses-Debian-Bug: #564084

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: Make the "filesystem is mounted" message more scary
Theodore Ts'o [Sat, 13 Mar 2010 00:25:33 +0000 (19:25 -0500)]
e2fsck: Make the "filesystem is mounted" message more scary

I guess the message wasn't scary enough for users who are just smart
enough to really get themselves in deep doo-doo.  Let's make it even
scarier.

Addresses-Launchpad-Bug: #537483

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoe2fsck: Make the -n always open the file system read-only
Theodore Ts'o [Sat, 13 Mar 2010 00:18:20 +0000 (19:18 -0500)]
e2fsck: Make the -n always open the file system read-only

A user was surprised when -n -D caused the file system to be opened
read/write, and then outsmarted himself when e2fsck asked the question:

   WARNING!!!  Running e2fsck on a mounted filesystem may cause
   SEVERE filesystem damage.

   Do you really want to continue (y/n)?

This is partially our fault for not documenting the fact that -D
overrode opening the filesystem read-write.  But the bottom line is it
much safer if -n *always* opens the file system read-only, so there
can be no confusion.  This means that we have to disable certain
combination of options, such as "-n -c", "-n -l", and "-n -L", and
"-n -D", but the utility of these combinations is pretty low, and
is more than offset by making e2fsck idiot-proof.

Addresses-Launchpad-Bug: #537483

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>