The e2undo command can be used to replay the transaction saved in the
transaction file using undo I/O Manager.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
The combination of meta_bg and resize_inode leads to a corrupt
filesystem, and it's not really clear it makes any logical sense.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This fixes some bugs which I introduced recently while revamping the
uninit_bg code. Since mke2fs is no longer calling
ext2fs_set_gdt_csum(), it's important that ext2fs_initialize()
correctly initialize bg_itable_unused for all block group descriptors.
In addition, mke2fs needs to zero out the the reserved inodes based on
the values of bg_itable_unused set by ext2fs_initialize().
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Mke2fs used to have special case, ugly code in
setup_lazy_bg/setup_uninit_bg flag which set the flags based on all
sorts of special cases. Change it so that it is done in libext2fs,
and fix mke2fs to use alloc_stats functions which will take care of
clearing the *_UNINIT flags automatically as needed.
This is preparatory work to make the flex_bg allocation patch much
cleaner.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This simplifies the code, and using the uninit_bg with the inode table
lazily initialized is just as good.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Instead of using -O lazy_bg,uninit_bg as the way of requesting that
the inode table be lazy unitialized, use the parameter
lazy_itable_init, which can either be set via mke2fs's -E option, or
via /etc/mke2fs.conf.
Also fix some random problems in mke2fs's man page, including
documenting the extent feature, which had been missing.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Allow the old name of uninit_groups when converting feature names for
backwards compatibility for scripts running mke2fs and tune2fs.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Provide mke2fs with a much more sophisticated system for controlling
configuration parameters of a newly created filesystem based on a
split filesystem and usage type system. The -t option to mke2fs was a
deprecated alias to -c; it now specifies a filesystem type (ext2,
ext3, ext4, etc.), while the -T option can now be a comma separated
usage list.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Change the function signature so that ext2fs_set_gdt_csum() returns an
error code.
If the inode bitmap hasn't been loaded return EXT2_ET_NO_INODE_BITMAP.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Previously, fsck was only passing in -Cn to the first e2fsck process
to start up, and enabling the progress information by sending a
SIGUSR1 signal. This didn't work if the progress information was
intended to go to file descriptor, since the information was never
passed to e2fsck.
So we now pass the progress fd in as a negative number if the progress
information is intended to be initially suppressed.
Addresses-Launchpad-Bug: #203323
Addresses-Sourceforge-Bug: #1926023
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
The exiting fsck instance wasn't marked as DONE, so the safety checks
thought a progress bar was still in progress, and so we didn't enable
another filesystem's checking.
Addresses-Debian-Bug: #432865
Addresses-Launchpad-Bug: #203323
Addresses-Sourceforge-Bug: #1926023
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
We need to set tm_isdst to -1 so that mktime will automatically
determine whether or not daylight savings time (DST) is in effect.
Previously tm_isdst was set to 0, which caused mktime to interpret the
time as if it was always not using DST.
Addresses-Debian-Bug: #471882
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
SuSE's security team audited uuidd and came up with these issues.
None of them are serious given that uuidd runs setuid as a
unprivileged user which has no special access other than libuuid
directory, but it's good to get them fixed.
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
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>
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>
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>
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 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>