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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
The major changes were:
* Fix realloc() leak on failure case from Jim Meyering
* Fixed various problems in transaction lock code
* Made transaction_brlock() static
* Added more fine-grained locking features
Moved from svn revision #22080 to #23590
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Adapted from the SuSE patch, but fixes a number of very serious
problems with the patch in SLES:
1) This changeset uses -M instead of -m; most lowercase options are
reserved for use by the filesystem-specific fsck programs. All new
fsck options must be upper case.
2) This changeset will skip the root filesystem in "fsck -AM", which
the SLES patch will not do.
3) Loading /proc/mounts into the fs_info can cause -t opts matching to
malfuction. So this changeset uses a simplified version of the
ismounted.c function from the ext2fs library.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
DJGPP lacks sys/select.h and sys/un.h; add header checks to be more
portable.
Signed-off-by: Christophe Grenier <grenier@cgsecurity.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Some systems don't have the 'dc' command installed, and this causes
configure to print a warning message unnecessarily for a standard
(non-WIP and non-pre) release of e2fsprogs.
It's easy enough to avoid this problem, so let's do it.
Addresses-Sourceforge-Bug: #1893024
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
The pid file was getting created before the fork(), so it had the
incorrect pid number. No one noticed for a while, since "uuidd -k"
will kill the daemon and it has enough automatic convenience functions
that it's usually not necessary to refer to the pid file except as a
convenient place for uuidd to lock against multiple instances of the
daemon starting up.
Addresses-Sourceforge-Bug: #1893244
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cygwin doesn't support lockf(), so move to fcntl() locking as more
portable. Also fix a bug which could cause get_lock() to loop forever
if the attempt to lock the file fails for some reason.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Since the test_script driver uses [A-Za-z], we need to set the locale
so we don't get bitten on locals where the sort order might be
different.
Addresses-Sourceforge-Bug: #1890526
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Address the theoretical problem of two threads trying to format a
different unknown error code by using TLS.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This isn't necessary since we don't install the init.d script (and
it's not the recommended way to start uuidd anyway).
Addresses-Sourceforge-Bug: #1885085
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
USB devices can return ENOMEDIUM, and when the filesystem cached
information wasn't flushed, it resulted in the wrong location of a
filesystem to be returned to the caller. The only justification for
using cached information when the open fails is in the case of a
permission denied error.
Addresses-Debian-Bug: #463787
Add logic that on Linux systems will check for the presence of the
ext4dev filesystem; if it isn't present, fall back to ext4 for
filesystems that are marked as being "OK for use on test filesystem
code". If they are OK for use for in-development filesystem code, it
should also be fine to use stable filesystem code if there is no test
filesystem code (ext4dev) available.
The reverse is not true, of course. We don't ever want to mount a
production filesystem using test filesystem code unless the user gives
us explicit permission via "tune2fs -E test_fs".
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>