Commit Graph

2504 Commits (205372e24f90d93e55a25c6176bc55a94d304450)

Author SHA1 Message Date
Theodore Ts'o edfd9b0a9f resize2fs: Fix resizing filesystems with large inodes
Use ext2fs_get_next_inode_full() in resize2fs and clean up large inode
handling; previous attempt was not properly handling all cases, and
was incorrectly setting i_extra_isize.  This caused some extended
attributes to get removed or randomly assigned to other inodes as a
result of the resize, which can be unfortunate on systems using
SELinux.

The previous commit didn't fix things completely on big-endian systems
like PowerPC.

Addresses-Red-Hat-Bugzilla: #434893

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-09 08:00:12 -04:00
Theodore Ts'o dd232049d1 blkid: Fix portability problem caused by using uint instead of unsigned int
This is needed to fix compilation with DJGPP; thanks to Cristophe
Grenier for pointing this out.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-08 20:01:05 -05:00
Theodore Ts'o e67670c32c Fix mke2fs man page regarding 128-byte default inode size
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-08 19:48:56 -05:00
Theodore Ts'o 399033a6ab Merge branch 'maint' 2008-02-29 00:43:29 -05:00
Theodore Ts'o e1e83b6ba9 Update release notes, version files for 1.40.7 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 23:46:40 -05:00
Theodore Ts'o 640d60eb2d debian: Avoid adding an empty directory in the uuid-dev package
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 23:45:09 -05:00
Theodore Ts'o 2c5e591d39 debian: Add required ${shlibs:Depends} to libss2's depend header
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 23:45:08 -05:00
Theodore Ts'o a4f4c0de10 Fix up debian copyright files to avoid Lintian errors
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 23:45:08 -05:00
Theodore Ts'o 8f741372aa Update e2fsprogs translation template and po/gmo files
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 21:47:05 -05:00
Theodore Ts'o ff662d5dbf tune2fs: Remove support for clearing the SPARSE_SUPER feature
Clearing SPARSE_SUPER is dangerous; it can result in a filesystem
which e2fsck can't fix easily.  Since there is very few good reasons
for wanting to turn this feature off, disable tune2fs's abiity to do
this.  Users who really want this can use debugfs.

Also, deprecate the tune2fs -s option.  Remove it from the man page
and usage message.

Addresses-Sourceforge-Bug: #1840286

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 21:26:01 -05:00
Theodore Ts'o bdd80f28d7 Update mke2fs usage message
Add options supported by mke2fs to its usage message.

Addresses-Sourceforge-Bug: #1751393

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 21:12:31 -05:00
Andreas Mohr 0fd2f90067 Add manpage references to debugfs/tune2fs commands
Make debugfs and tune2fs reference each other in the "SEE ALSO"
section.

Addresses-Sourceforge-Patches: #1399325

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 20:57:08 -05:00
Mike Frysinger 1f803990b8 Fix makefile dependency issues for various install targets
Addresses-Sourceforge-Patches: #1903484
Addresses-Sourceforge-Patches: #1903466
Addresses-Sourceforge-Patches: #1903456

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 20:45:39 -05:00
Theodore Ts'o d0f24159aa Improve descriptions for the r_move_itable and r_resize_inode tests
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 19:54:03 -05:00
Eric Sandeen 09fbe0fb33 Add regression test for resize2fs moving inodes with inline xattrs
The image contains an inode past the resize point with an inline xattr
value of "propervalue".  It also contains deleted inodes which had the
xattr value "oldvalue".

When resize2fs moves the inode, it should copy the xattr as well, so
that post-resize we see "propervalue" not "oldvalue".

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 19:50:09 -05:00
Eric Sandeen 4ef28824ca resize2fs: Fix movement of large (greater than 128 byte) inodes
inode_scan_and_fix() in resize2fs needs to do read/write of the full
inode to be sure it gets all data from larger (>128 byte) inodes.

Addresses-Red-Hat-Bugzilla: #434893

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28 18:05:41 -05:00
Theodore Ts'o a49670e64e Merge branch 'maint'
Conflicts:

	lib/blkid/devname.c
	lib/blkid/probe.c
	misc/mke2fs.c
	misc/tune2fs.c
2008-02-27 18:53:34 -05:00
Theodore Ts'o 4f9abdcb30 e2fsck: Print an explicit message when the bad block inode is updated
Some users were confused about why the filesystem was modified.

Addresses-Sourceforge-Bug: #756460

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-27 15:10:20 -05:00
Theodore Ts'o 558df54458 Add support for manipulating large_file feature in mke2fs and tune2fs
Previously we just let the kernel and e2fsck do this automatically,
but e2fsck will no longer automatically clear the large_file feature.
It still isn't really necessary to worry about this feature flag
explicitly, but some users seem to care.

Addresses-Red-Hat-Bugzilla: #258381

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-27 15:01:19 -05:00
Theodore Ts'o 1547265859 fsck: Don't complain about an old-style fstab if the fstab is empty
Addresses-Debian-Bug: 468176

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-27 14:19:18 -05:00
Theodore Ts'o 5aae7c292f debugfs: Fix find_free_block to avoid reporting the block more than once
Addresses-Sourceforge-Bug: #1096315

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-27 13:38:56 -05:00
Theodore Ts'o 3a538e4244 Fix gcc -Wall warnings for lib/blkid/probe.c
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-27 02:06:08 -05:00
Theodore Ts'o 77175ca20c e2fsck: Don't clear the LARGE_FILES feature flag
Stop clearing the EXT2_FEATURE_RO_COMPAT_LARGE_FILE flag automatically
if there are no large files in the filesystem.  It's been almost a
decade since there have been kernels that don't support this flag, and
e2fsck clears it quietly without telling the user why the filesystem
has been changed.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-27 00:00:30 -05:00
Theodore Ts'o 1f1ee19485 libblkid: Add error checking to devicemapper code to avoid segfaults
If a device mapper volume disappears while libblkid code is running,
it is possible for the devicemapper code to return errors, and since
libblkid wasn't checking for error returns, it would dereference a
null pointer and crash.  Add error checking to prevent this.

Addresses-RedHat-Bugzilla: #433857

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 22:24:42 -05:00
Theodore Ts'o dcc91e1053 Enhance e2fsck's reporting for reporting unsupported filesystem features
Addresses-Sourceforge-Feature-Request: #1175808

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 20:59:56 -05:00
Theodore Ts'o ab52e12a90 libext2fs: Add EXT2_FLAG_NONFREE_ON_ERROR to ext2fs_open2()
Add a flag which returns the partially completed filesystem object so
e2fsck can print more intelligent error messages.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 20:45:36 -05:00
Theodore Ts'o db197a81cc Fix dumpe2fs parsing of explicit superblock/blocksize parameters
The dumpe2fs syntax documented in the man page has been broken for
some time due to getopt() changes.  Change the option syntax in
dumpe2fs to be one which is more extensible and consistent with the
format for extended options in mke2fs and tune2fs.

Addresses-Sourceforge-Bug: #1830994

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 19:05:33 -05:00
Theodore Ts'o c149e226a0 Eliminate really obsolete references to Linux 2.0/2.1/2.2 in tune2fs man page
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 17:38:48 -05:00
Theodore Ts'o 037914e28f tune2fs: Add support to clear the resize_inode feature
This requires an fsck aftwards.  We don't allow setting the
resize_inode feature because extensive work to tune2fs or e2fsck to
safely relocate blocks is necessary in order to reserve the blocks
needed by the resize inode.

Addresses-Red-Hat-Bugzilla: #167816

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 17:31:06 -05:00
Theodore Ts'o 885bf6b832 tune2fs: Cleanup feature handling to avoid merge conflicts
Use a more abstract set of feature tests to avoid merge conflicts as
we add support for new features in the maint, master, next, and pu git
branches.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 15:08:14 -05:00
Theodore Ts'o 7c4a2ef594 Teach tune2fs to use e2p_edit_feature2() to provide better error handling
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 15:05:47 -05:00
Theodore Ts'o 7100351d35 libe2p: New e2p_edit_feature2 which provides better error handling
This creates a new enhanced edit_feature function for libe2p which
supports a different set of feature flags that are OK to clear as
opposed to set, and which returns more specific information about why
the user provided an invalid edit feature command.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 14:26:01 -05:00
Theodore Ts'o a3d9d37664 e2fsck: Document that the -D option finds duplicate file names
Document in the e2fsck man page that e2fsck finds duplicate filenames
only when the -D option is passed to e2fsck.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 12:50:51 -05:00
Theodore Ts'o 949bc9aa87 debian: Pass 100 to UID_MIN and GID_MIN, not 1
According to the policy, UIDs and GIDs in the range 1-100 are reserved
to be globally allocated by the base-passwd package. The libuuid1
postinstall script passes in UID_MIN=1 and GID_MIN=1.  The useradd and
groupadd commands seems to skip UID's between 1 and 100 anyway, but
it's confusing, so we should pass in UID_MIN=100 and GID_MIN=100 for
clarity and in case useradd and groupadd ever changes their behaviour.

Addresses-Debian-Bug: #466929

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-26 12:11:47 -05:00
Theodore Ts'o 395529bb46 libe2p: Change Raid to RAID in display option
Update m_raid_opt test so that it reflects the code change.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-22 16:52:27 -05:00
Valerie Clement e6bbc002c5 Add missing shift for ei_leaf_hi
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-22 15:57:34 -05:00
Valerie Clement d46d67a845 Add missing free in ext2fs_extent_free()
handle->path should be freed in ext2fs_extent_free()

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-22 15:56:23 -05:00
Theodore Ts'o 7dc099887c e2fsck: Account for index nodes in the extent tree for i_blocks
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-22 15:53:50 -05:00
Theodore Ts'o f159ff32e3 mke2fs: Remove warning for inode_size > 128 bytes
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-22 15:40:37 -05:00
Theodore Ts'o 34658361cf mke2fs: Remove 2.4 kernel warning for blocksizes > 4096 bytes
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-22 15:03:49 -05:00
Theodore Ts'o 2ccf62fd8e mke2fs: Remove requirement for -f option for filesystems > 2**31 blocks
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-22 15:01:03 -05:00
Theodore Ts'o 107f291cdc Add ability to set (but not clear) the extents feature to tune2fs
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-20 08:20:02 -05:00
Theodore Ts'o bf6b848e12 Allow mke2fs to create filesystems with the EXTENTS feature
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-20 08:13:19 -05:00
Theodore Ts'o 7a3e1b7bff Fix memory leak in ext2fs_alloc_block()
If a block buffer was not supplied and ext2fs_alloc_block() returned
with no errors, it would leak a temporary block buffer.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-19 08:40:27 -05:00
Eric Sandeen a451d92f38 blkid: detect LVM2 physical volumes
Bits liberally stolen from lvm2 userspace.

Addresses-Red-Hat-Bugzilla: #409321

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-02-19 08:40:15 -05:00
Theodore Ts'o 0157e7c635 Merge branch 'maint' into next 2008-02-18 23:01:43 -05:00
Theodore Ts'o 6b226c3de2 libe2p: Make list_super2() print the RAID stride and stripe-width
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 22:59:42 -05:00
Theodore Ts'o 0c17cb25f2 Add support for setting RAID stride and strip-width via mke2fs and tune2fs
This is useful for mballoc to align block allocation on the RAID
stripe boundaries.

Signed-off-by: Rupesh Thakare <rupesh@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 22:56:25 -05:00
Theodore Ts'o 007df86011 debugfs: Add new superblock fields to the set_super_value command
Signed-off-by: Rupesh Thakare <rupesh@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18 22:16:52 -05:00
Eric Sandeen 290ac0e321 print "mostly-printable" xattr strings in debugfs
Taking a cue from getfattr... if a string is "mostly"
printable characters, go ahead & print as a string,
and escape what's left over.

so we get:

Extended attributes stored in inode body:
  selinux = "system_u:object_r:root_t:s0\000" (28)

instead of:

Extended attributes stored in inode body:
  selinux = "73 79 73 74 65 6d 5f 75 3a 6f 62 6a 65 63 74 5f 72 3a 72 6f 6f 74 5f 74 3a 73 30 00 " (28)

(selinux includes the trailing null in "len" so it
never prints as a string today)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-02-18 22:11:20 -05:00