History log of /external/e2fsprogs/misc/tune2fs.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4d4335323ea7d863ac2f907e7e90ae4d63c310bd 01-Sep-2016 Theodore Ts'o <tytso@mit.edu> tune2fs: tell the user that e2fsck -f is required

The message requesting that the user run e2fsck doesn't include the -f
option, and this is needed to force a file system check.

Addresses-Debian-Bug: #828022

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
81f965a04df5053d2c4bf6ad33b97c4fdc7bfb90 07-Jun-2016 Theodore Ts'o <tytso@mit.edu> tune2fs,resize2fs: special case HURD only when testing s_creator_os

The s_creator_os field was a mistake, given how Hurd has been
ab(using) certain file system fields. We should skip support for
certain advanced features (64-bit support, metadata checksums) for
file systems created on the Hurd OS only, instead of only supporting
them for file systems created on Linux. This fixes various regression
test failures for FreeBSD.

(The regression tests are probably mostly hopeless for Hurd anyway,
but given the HURD abuse's of various file system fields, the HURD is
going to have to be given second-class treatment in any case, given
what they decided to do with ext2 support, which locks them out of the
more advanced file system features, anyway.)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
478360f50b68356849813f97db46fd156da5248e 30-May-2016 Theodore Ts'o <tytso@mit.edu> Fix Android build warnings

Also fix some additional gcc -Wall build warnings in a traditional
Linux environment.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
a701823a31505c5765d327d02bb14aa43fc34ae5 29-May-2016 Theodore Ts'o <tytso@mit.edu> libsupport: fix gcc -Wall nits

Also add better error checking to mke2fs and e2fsck's calls to quota
functions in libsupport.a.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
bc8f1ae5237b85e1dc0ac4781da170ecc3a035fe 09-May-2016 Theodore Ts'o <tytso@mit.edu> Fix various man pages and usage message

Thanks to pete@lyptonyx for doing a close pass editing of e2fsprogs's
man pages.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
1fc23b5e773a7a30130842a8091af546d5dd9875 16-Apr-2016 Theodore Ts'o <tytso@mit.edu> Fix support for configure --enable-jbd-debug

We haven't used this in a while, so it's bitrotted a bit. Fix it up
so that it works correctly.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
9c05bb9fbae9d31d4a0c0d52b5ecec8ebd1b9011 18-Mar-2016 Theodore Ts'o <tytso@mit.edu> tune2fs: don't include journal recovery when building for Android

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
82e48fb1637a2b6d4d789516eae57d27fefb605e 18-Mar-2016 Theodore Ts'o <tytso@mit.edu> Fix various clang and gcc -Wall warnings

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
c864b9eb50013f0aa5f3b413f1c2611e90625b35 13-Feb-2016 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: recover the journal

If the journal needs to be recovered to avoid clobbering whatever
changes tune2fs makes, do so.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
62e0d34b5149bfcf653df8387f426f47cc878c39 13-Feb-2016 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: confirm dangerous operations

Give admins a short amount of time to confirm that they want to
proceed with a dangerous operation. Refuse to perform the op
unless the filesystem is freshly checked.

Cc: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
2be9cd8655cffa360752b1f41d6407d4aa78baa0 05-Mar-2016 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: allow user to turn on saving the checksum seed

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
080e09b46ff1f6b00b26231868002e781e98adf2 01-Mar-2016 Li Xi <pkuelelixi@gmail.com> Add project quota support

This patch adds project quota support. An new quota type PRJQUOTA(2)
is added. EXT4_PRJ_QUOTA_INO(11) is reserved for project quota inode.
The super block reservers an field s_prj_quota_inum for saving
project quota inode. And each inode adds an internal field i_projid
for saving its project ID.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
0c18d0368a8cbcff27a1923902cc29439981454f 01-Mar-2016 Li Xi <pkuelelixi@gmail.com> Add project feature flag EXT4_FEATURE_RO_COMPAT_PROJECT

This patch add project feature flag EXT4_FEATURE_RO_COMPAT_PROJECT.
Project feature is a read-only compat feature. Thus, an ext4 file
system with project feature enabled could only be read by ext4
kernel module without project feature support.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
2d2d799c72610f4d9b4910e7f1516f11288e1cf1 12-Jan-2016 Li Xi <pkuelelixi@gmail.com> Clean up codes for adding new quota type

Project quota related fields are reserved in Linux kernel.
As a preparation for it, this patch cleans up quota codes
of e2fsprogs so as to make it easier to add new quota type(s).

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
94676ef2b30d80c11008f0e13c77029e286bd0d7 01-Dec-2015 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
c5b3ae7fb5d58dd12a1e02c2443bad32c8a76150 30-Nov-2015 Jim Garlick <garlick@llnl.gov> tune2fs: warn if the filesystem journal is dirty

Running tune2fs on a filesystem with an unrecovered journal can
cause the tune2fs settings changes in the superblock to be reverted
when the journal is replayed if it contains an uncommitted copy of
the superblock. Print a warning if this is detected so that the
user isn't surprised if it happens.

Signed-off-by: Jim Garlick <garlick@llnl.gov>

Updated message printed to include steps to replay journal.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
7889640d6d0b3ec3ce0f557e563e84c7bbe3fc19 24-Oct-2015 Darrick J. Wong <darrick.wong@oracle.com> misc: clean up feature test macros with predicate functions

Create separate predicate functions to test/set/clear feature flags,
thereby replacing the wordy old macros. Furthermore, clean out the
places where we open-coded feature tests.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
2334bd3ae56a4a8eff8e129da3c7aeec9672c6e1 06-Sep-2015 Theodore Ts'o <tytso@mit.edu> tune2fs: allow changing the UUID mounted file systems with the -f option

There are times when it is necessary to update the UUID on a mounted
root file system (for example). So when we add this this safety check
to e2fsprogs 1.43, we will likely break some scripts. Allow the -f
option to force an override of this safety check.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
4e222d9b88b7ff145ad03272acf752c1e7a18964 13-Jul-2015 Theodore Ts'o <tytso@mit.edu> misc: cleanup gcc -Wall warnings

Also change ext2fs_symlink() so that the target parameter is a const
char *, thus promising that we will never change the incoming string.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
25f291c9b32d8017e6969c72a75e37d354c0570b 13-Jul-2015 Theodore Ts'o <tytso@mit.edu> Eliminate unused parameter warnings from Android build

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
99ceb8ec1acd7f38da289966b9984b3ffa1914a9 13-Jul-2015 Theodore Ts'o <tytso@mit.edu> Move the check_plausibility() function from misc to lib/support

The check_plausibility() function is now used all over the place, so
we should move the plausible.c file to lib/support and remove the
special case handling for that file that had been in the build system.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
273c2c5dfdd0d42736d8c57d0ba10e15e6c694cd 12-Jul-2015 Theodore Ts'o <tytso@mit.edu> tune2fs: allow tune2fs to be built as a static library for Android

Sync up with aosp's e2fsprogs commits:

d25948b9b4a9e361ef071dc8175df0407f60b7e0
e59f7c7cedb1e07eb4dbbb66e115c14faea19f19

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
f34af41b72ed8ca29b4579a8967ced7b61924c71 12-Jul-2015 Theodore Ts'o <tytso@mit.edu> rename libquota.a to libsupport.a

We will be using libsupport.a for e2fsprogs's internal support
functions. It will contain the quota support functions, but we will
also be moving code such as profile.c and plausible.c to libsupport.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
9e8fcd6e01c298ead62aafc7f7ba342a59c9b0e8 04-Jul-2015 Theodore Ts'o <tytso@mit.edu> configure: remove support to disable quota support

For the 1.43 release, quota support will be the default. It's much
simpler if we don't try to make quota support optional. This was done
originally because the quota feature wasn't fully tested. It is now,
so we can remove this as an option.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
83c799dea0fba4009fbb17cfda70006bc5cf0f4e 20-Jun-2015 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
59707c1b5833d580dbd05bae85b71c0da20c3078 23-May-2015 Andreas Dilger <adilger@dilger.ca> misc: fix alignment warnings on ARM

Some temporary char buffers allocated on the stack are not properly
aligned when typecast to a structure containing __u32 or __u64 types,
and this can cause alignment warnings on ARM and other alignment
sensitive architectures, and potential slowdowns to do fixups.

Fix the buffer alignment to avoid such issues.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=680090

Reported-by: Gordan Bobic <gordan.bobic@gmail.com>
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
81f95d43d52adef4d46a9c60d4cbb98ed5043062 26-May-2015 Theodore Ts'o <tytso@mit.edu> libext2fs, libe2p, misc: git rid of jfs_user.h

Having multiple versions of jfs_user.h was confusing the Android
build. Clean up things by removing the lib/ext2fs/jfs_user.h and
misc/jfs_user.h and simplifying how we emulate the kernel
infrastructure needed by journal replay code and removing the
kernel-specific lines from kernel-jbd.h.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
b0851392244e2a87cad67739d86c7489d4db3222 17-May-2015 Darrick J. Wong <darrick.wong@oracle.com> misc: fix undo file setup

Fix Coverity bugs 1297094-1297101 by fixing all the mutations in the
*_setup_tdb() functions, fixing buffer overflows, and checking
return values.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
f7d055945e2d6bb0b82ab1587e173a3003699298 05-May-2015 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: optionally create undo file

Provide the user with an option to create an undo file so that they
can roll back a failed tuning operation. Previously, one would be
created for inode resize if a bunch of (undocumented) conditions were
met.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
654531df2aed7a0f0025bfaaf3b71df21b33eac0 06-Apr-2015 Theodore Ts'o <tytso@mit.edu> tune2fs: add ability to enable the encrypt feature

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
8b39e4cf77fa1937879b42faf1f445dc600e2f46 23-Feb-2015 Theodore Ts'o <tytso@mit.edu> Add support for the read-only feature

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
e263765505914063d59d3752454b3abf2c1ade3c 27-Jan-2015 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: direct user to resize2fs for 64bit conversion

If the user tries to enable or disable the 64bit feature via tune2fs,
tell them how to use resize2fs to effect the conversion.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
f2a96b6eb96a044e81c8f5425c417dd0925bdead 27-Jan-2015 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: abort when trying to enable/disable metadata_csum on mounted fs

Earlier, I tried to make tune2fs abort if the user tried to enable or
disable metadata_csum on a mounted FS, but forgot the exit() call.
Supply it now.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
dd3ffbc918f920bea3219e453262346cbf6148ca 27-Jan-2015 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: disable csum verification before resizing inode

When we're turning on metadata checksumming /and/ resizing the inode
at the same time, disable checksum verification during the
resize_inode() call because the subroutines it calls will try to
verify the checksums (which have not yet been set), causing the
operation to fail unnecessarily.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
fe12931f8fa1f896d576c9a3065d1050956a2e04 15-Dec-2014 Darrick J. Wong <darrick.wong@oracle.com> resize2fs: convert fs to and from 64bit mode

resize2fs does its magic by loading a filesystem, duplicating the
in-memory image of that fs, moving relevant blocks out of the way of
whatever new metadata get created, and finally writing everything back
out to disk. Enabling 64bit mode enlarges the group descriptors,
which makes resize2fs a reasonable vehicle for taking care of the rest
of the bookkeeping requirements, so add to resize2fs the ability to
convert a filesystem to 64bit mode and back.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Cc: TR Reardon <thomas_reardon@hotmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
052795e63094809e105ef911170a58f10919769c 14-Dec-2014 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: enable uninit_bg when disabling metadata_csum

If we're disabling metadata_csum and the user doesn't provide explicit
instructions to enable or disable uninit_bg, assume that they want
uninit_bg to be turned on by default. Otherwise, we lose all block
group flags and unused inode count, which is a big hit to performance.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
a742a128a04109a7c59a8520ec84674e17e35b1e 14-Dec-2014 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: warn if extents are not enabled when turning on metadata_csum

Warn the user if we're trying to enable metadata_csum on a FS that
doesn't support extents (since block maps cannot contain checksums).

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
ad4eafb28d5c985fdeed337da500bbf15b6b816d 03-Dec-2014 Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com> tune2fs: fix memory write overflow

If we apply this patch 'e2fsprogs/tune2fs: rewrite metadata checksums
when resizing inode size', we will trigger a segfault, this is because
of the inode cache issues.

Firstly we should notice that in expand_inode_table(), we have change
the super block's s_inode_size to new inode size(for example, 256).

Then we re-compute metadata checksums, see below code flow:
|-->rewrite_metadata_checksums
|----->rewrite_inodes
|-------->ext2fs_write_inode_full
In ext2fs_write_inode_full(), if an inode cache is hit, the below code will be executed:
/* Check to see if the inode cache needs to be updated */
if (fs->icache) {
for (i=0; i < fs->icache->cache_size; i++) {
if (fs->icache->cache[i].ino == ino) {
memcpy(fs->icache->cache[i].inode, inode,
(bufsize > length) ? length : bufsize);
break;
}
}
}

Before executing rewrite_inodes(), actually the inode in inode cache
is allocated by old inode size(for example, 128), but here the memcpy
will obviously write overflow, '(bufsize > length) ? length : bufsize'
here will return 256(new inode size), so this is wrong, we need to fix
this. I think we should call ext2fs_free_inode_cache() in
expand_inode_table(), to drop the inode cache, because inode size has
changed, if necessary, we will re-create this inode cache.

Steps to reproduce this bug (apply 'tune2fs: rewrite metadata checksums
when resizing inode size' first):
dd if=/dev/zero of=file.img bs=1M count=128
device_name=$(/sbin/losetup -f)
/sbin/losetup -f file.img
mkfs.ext4 -I 128 -O ^flex_bg $device_name
tune2fs -I 256 $device_name

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
8386a4214600fa410d3019c73d4f2877859569b4 03-Dec-2014 Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com> tune2fs: rewrite metadata checksums when resizing inode size

When we use tune2fs -I new_ino_size to change inode size, if
everything is OK, the corresponding ext4_group_desc.bg_free_blocks_count
will be decreased, so obviously, we need to re-compute the group
descriptor checksums, and the inode 's size has also changed, we also
need to recompute the checksums of inodes for metadata_csum
filesystem, so here we choose to call a rewrite_metadata_checksums(),
this will fix checksum issues.

Meanwhile, the patch will trigger an existing memory write overflow,
which will casue segfault, please see the next patch.

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
bbf29ce6e9301b90fc52040f039e77bd28cdd1c1 03-Dec-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
5da8912008bbcfcaef3c8109831fdb4af40cd4fd 03-Dec-2014 Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com> tune2fs: fix memory leak in inode_scan_and_fix()

When we use ext2fs_open_inode_scan() to iterate inodes and finish
jobs, we also need a ext2fs_close_inode_scan(scan) operation, but in
inode_scan_and_fix(), we forgot to call it, fix this error.

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
a4b528692ed7c2d7bdeb1313cfaef3a14f5267a0 04-Nov-2014 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: don't change metadata_csum on a mounted fs

Don't let users change metadata_csum on a mounted filesystem because
there's no way to tell the kernel to turn on the feature; there's no
way to prevent the kernel from rewriting on-disk structures while
tune2fs is also rewriting them; and there's no way to tell the kernel
to reload them after tune2fs is finished.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
8302e2e68813fa1b18b15cbeab7d7a58934553ea 04-Nov-2014 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: speed up rewriting extent tree when enabling metadata_csum

When enabling checksums, tune2fs naively rewrites every extent in the
entire tree! This is unnecessary since we only need to rewrite each
extent tree block; therefore, only rewrite the extent if it's the
first one in an internal extent tree block.

Also, don't bother iterating the extent tree when clearing checksums.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
c8b20b40ebf0278b2d100a964a32d8e13046f437 14-Sep-2014 Darrick J. Wong <darrick.wong@oracle.com> misc: add plausibility checks to debugfs/tune2fs/dumpe2fs/e2fsck

If any of these utilities detect a bad superblock magic, call
check_plausibility to see if blkid can identify the passed-in argument
as something else (xfs, partition, etc.) in the hopes of catching a
user error.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
b598c517b394b0fa9de1a3cf709f780ca42d4583 19-Sep-2014 Darrick J. Wong <darrick.wong@oracle.com> misc: move check_plausibility into a separate file

Move check_plausibility() into a separate file so that various
programs can use it without having to declare useless global variables
that the util.c functions seem to require.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
1bbea9c90932c6b6f2f4ba0e0abb9da4501efce9 19-Sep-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
d9112409a2655851d9c88680764b0bbc591c4a4b 19-Sep-2014 Darrick J. Wong <darrick.wong@oracle.com> misc: zero s_jnl_blocks when adding journal online or removing external journal

Erase s_jnl_blocks when removing an external journal, or adding an
internal journal online. We can't add the backup for the internal
journal because we have no good way to get the indirect block or ETB
addresses, so the best we can do is hope that the user runs e2fsck,
which will correct that. We are motivated to erase during external
journal removal to state emphatically that there's no journal.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: thomas_reardon@hotmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
3f4c4079976f1ccf0a6d675b0115b519f596da89 11-Sep-2014 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: always check disable_uninit_bg() return code

Enhance disable_uninit_bg() to return error codes -- if something goes
wrong, we want to flag the FS as needing a fsck and exit. Mr. Reardon
discovered that tune2fs -O ^metadata_csum on a FS with a corrupt
bitmap would leave the FS in a weird state.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: TR Reardon <thomas_reardon@hotmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
e690eae5134f9ac101c49a8ca0e096da186da067 09-Sep-2014 Darrick J. Wong <darrick.wong@oracle.com> misc: zero s_jnl_blocks when removing internal journal

When we're removing the internal journal (broken journal, turning it
off, or adding an external journal), zero s_jnl_blocks so that they
can't be picked up by accident later.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Cc: TR Reardon <thomas_reardon@hotmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
811bccef89a074e1c1582439a79b4b34e9d47e2c 09-Sep-2014 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: explicitly disallow tuning of journal devices

Spit out a more specific error if someone tries to modify an
external journal device.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: TR Reardon <thomas_reardon@hotmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
c4c9bc590c4a1f21ec3053aacc232430493f10b0 24-Aug-2014 Darrick J. Wong <darrick.wong@oracle.com> misc: fix gcc warnings

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
14207cf60e0f53b57ef8252a8ae3f6a124465b64 03-Aug-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
configure
misc/Makefile.in
0befec4e24377e391dca2a3f9e6e163f18b132ce 30-Jul-2014 Andreas Dilger <adilger@dilger.ca> misc: quiet signed/unsigned charactr compiler warnings

Quiet warnings about signed vs. unsigned character mismatch.
Use __u8 for storing UUIDs instead of char to match the superblock
s_uuid field.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
7d0109c0853e3f7c618a352fdd7c9e4924fadfcf 31-Jul-2014 Theodore Ts'o <tytso@mit.edu> tune2fs: fix uninitialized variable in remove_journal_device

This bug was introduced by commit 7dfefaf413bbd ("tune2fs: update
journal super block when changing UUID for fs").

Fixes-Coverity-Bug: 1229243

Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
643fd7e7aac21f02e61f0fcbe58b4433d67c862c 29-Jul-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
9c2c1e9a3d12563c68d6817b609bbfec0af149cb 28-Jul-2014 Azat Khuzhin <a3at.mail@gmail.com> tune2fs: update journal users while updating fs UUID (with external journal)

When we have fs with external journal device, and updating it's UUID, we
should update UUID in users list for that external journal device.

Before:
$ tune2fs -U clear /tmp/dev
tune2fs 1.42.10 (18-May-2014)
$ dumpe2fs /tmp/dev | fgrep UUID
dumpe2fs 1.42.10 (18-May-2014)
Filesystem UUID: <none>
Journal UUID: da1f2ed0-60f6-aaaa-92fd-738701418523
$ dumpe2fs /tmp/journal | fgrep users -A10
dumpe2fs 1.42.10 (18-May-2014)
Journal number of users: 2
Journal users: 0707762d-638e-4bc6-944e-ae8ee7a3359e
0ad849df-1041-4f0a-b1c1-2f949d6a1e37

After:
$ sudo tune2fs -U clear /tmp/dev
tune2fs 1.43-WIP (18-May-2014)
$ dumpe2fs /tmp/dev | fgrep UUID
dumpe2fs 1.42.10 (18-May-2014)
Filesystem UUID: <none>
Journal UUID: da1f2ed0-60f6-aaaa-92fd-738701418523
$ dumpe2fs /tmp/journal | fgrep users -A10
dumpe2fs 1.42.10 (18-May-2014)
Journal number of users: 2
Journal users: 0707762d-638e-4bc6-944e-ae8ee7a3359e
00000000-0000-0000-0000-000000000000

Also add some consts to avoid *magic numbers*:
- UUID_STR_SIZE
- UUID_SIZE
- JFS_USERS_MAX
- JFS_USERS_SIZE

Proposed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
7dfefaf413bbd4f7f51e2664dc4911873236ffdd 28-Jul-2014 Azat Khuzhin <a3at.mail@gmail.com> tune2fs: update journal super block when changing UUID for fs.

Using -U option you can change the UUID for fs, however it will not work
for journal device, since it have a copy of this UUID inside jsb (i.e.
journal super block). So copy UUID on change into that block.

Here is the initial thread:
http://comments.gmane.org/gmane.comp.file-systems.ext4/44532

You can reproduce this by executing following commands:
$ fallocate -l100M /tmp/dev
$ fallocate -l100M /tmp/journal
$ sudo /sbin/losetup /dev/loop1 /tmp/dev
$ sudo /sbin/losetup /dev/loop0 /tmp/journal
$ mke2fs -O journal_dev /tmp/journal
$ tune2fs -U da1f2ed0-60f6-aaaa-92fd-738701418523 /tmp/journal
$ sudo mke2fs -t ext4 -J device=/dev/loop0 /dev/loop1
$ dumpe2fs -h /tmp/dev | fgrep UUID
dumpe2fs 1.43-WIP (18-May-2014)
Filesystem UUID: 8a776be9-12eb-411f-8e88-b873575ecfb6
Journal UUID: e3d02151-e776-4865-af25-aecb7291e8e5
$ sudo e2fsck /dev/vdc
e2fsck 1.43-WIP (18-May-2014)
External journal does not support this filesystem

/dev/loop1: ********** WARNING: Filesystem still has errors **********

Reported-by: Chin Tzung Cheng <chintzung@gmail.com>
Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
3e077c357cf20417547c8a4e589489c2ebdd66ca 28-Jul-2014 Azat Khuzhin <a3at.mail@gmail.com> tune2fs: remove_journal_device(): use the correct block to find jsb

Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
7f33024ac293e8ff98a73b21452adc464929da31 28-Jul-2014 Azat Khuzhin <a3at.mail@gmail.com> journal: use consts instead of 1024 and add helper for journal with 1k blocksize

Use EXT2_MIN_BLOCK_SIZE, JFS_MIN_JOURNAL_BLOCKS, SUPERBLOCK_SIZE, and
SUPERBLOCK_OFFSET instead of hardcoded 1024 when it is okay, and also
add a helper ext2fs_journal_sb_start() that will return start of
journal sb with special case for fs with 1k block size.

Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
50972e1f7dd33955d1f23de8123dae235a65af44 26-Jul-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
debugfs/debugfs.c
e2fsck/pass5.c
1e33a8b408123a4e02a6b9135807f6fd61f3e235 26-Jul-2014 Theodore Ts'o <tytso@mit.edu> Fix 32/64-bit overflow when multiplying by blocks/clusters per group

There are a number of places where we need convert groups to blocks or
clusters by multiply the groups by blocks/clusters per group.
Unfortunately, both quantities are 32-bit, but the result needs to be
64-bit, and very often the cast to 64-bit gets lost.

Fix this by adding new macros, EXT2_GROUPS_TO_BLOCKS() and
EXT2_GROUPS_TO_CLUSTERS().

This should fix a bug where resizing a 64bit file system can result in
calculate_minimum_resize_size() looping forever.

Addresses-Launchpad-Bug: #1321958

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
7f7d1cb462789eef8e359caa46523ed6b99255e1 06-Jul-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
debugfs/set_fields.c
tests/f_mmp/script
tests/f_mmp_garbage/script
tests/m_mmp/script
tests/t_mmp_1on/script
tests/t_mmp_2off/script
47fee2ef6a23ae06f680336ffde57caa64604a4c 06-Jul-2014 Lukas Czerner <lczerner@redhat.com> e2fsprogs: introduce ext2fs_close_free() helper

Currently there are many uses of ext2fs_close() which might be wrong.
First of all ext2fs_close() does not set the ext2_filsys pointer to NULL
so the caller is responsible for clearing it, however there are some
cases there we do not do it.

Second of all very small number of users of ext2fs_close() actually
check the return value. If there is a problem in ext2fs_close() it will
not even free the ext2_filsys structure, but majority of users expect it
to do so.

To fix both problems this commit introduces a new helper
ext2fs_close_free() which will not only check for the return value and
free the ext2_filsys structure if the call to ext2fs_close2() failed,
but it will also set the ext2_filsys pointer to NULL.

Replace every use of ext2fs_close() in e2fsprogs tools with
ext2fs_close_free() - there is no real reason to keep using
ext2fs_close().

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
/external/e2fsprogs/misc/tune2fs.c
bbccc6f3c6a106721fb6f1ef4df6bc32c7986235 27-May-2014 Andreas Dilger <adilger@dilger.ca> misc: fix compile warnings on master branch

Fix compile warnings found on the master branch when using LLVM.

- Add missing format string when using the libintl _() macro
- include <limits.h> header to get PATH_MAX definition
- fix format vs. variable mismatches
- add header block for create_inode.c file
- remove use of bzero(), use ext2fs_get_memzero() instead

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
ba08cb996a10a8f5e72625ed054cb029571d84e0 13-May-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
debugfs/Makefile.in
debugfs/debug_cmds.ct
debugfs/debugfs.c
debugfs/debugfs.h
e2fsck/Makefile.in
misc/Makefile.in
misc/mke2fs.c
1c358e6e127b605d29e535e575994d3583a19c72 11-May-2014 Theodore Ts'o <tytso@mit.edu> quota: remove mke2fs's and tune2fs's warning messages regarding quota

We no longer need to reference https://ext4.wiki.kernel.org/index.php/Quota
since we've fixed the nasty bugs associated with e2fsck and the quota
feature. The wiki page will be updated once we've done a release that
includes these fixes indicated the verison which these problems have
been fixed.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Aditya Kali <adityakali@google.com>
/external/e2fsprogs/misc/tune2fs.c
d37178bb879c6949827d72fc80b1218995644258 11-May-2014 Theodore Ts'o <tytso@mit.edu> quota: integrate mkquota.h into quotaio.h

There are interfaces that are used by mke2fs.c and tune2fs.c which are
in quotaio.h, and some future changes will be much simpler if we can
combine the two header files together. Also the guard #ifdef for
mkquota.h was incorrect, which caused problems when both header files
needed to be included.

Also remove quota.pc and installation rules for libquota, since this
library is never going to be something that we can export externally
anyway. Eventually we'll want to clean up the interfaces and move the
external publishable interfaces to the libext2fs library, and then
rename what's left from libquota.a to libsupport.a for internal use
only.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Aditya Kali <adityakali@google.com>
/external/e2fsprogs/misc/tune2fs.c
c9bc7484cc79f486f6cf4a36a5d936e545f99f3d 12-May-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
e2fsck/pass1.c
f83f4132e192dee197240fdfa062128b52188d1c 26-Apr-2014 Theodore Ts'o <tytso@mit.edu> mke2fs: add an option in mke2fs.conf to proceed after a delay

If mke2fs needs to ask the user for permission, and the user doesn't
type anything the specified delay in the /etc/mke2fs.conf file,
proceed as if the user had said yes. The default is to do what we
currently do, which is to wait until the user answers the question one
way or the other.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
d69f43f56a215b3335d8cf853b6521715e90b769 26-Apr-2014 Theodore Ts'o <tytso@mit.edu> mke2fs, tune2fs: call proceed_question() from check_plausibility()'s caller

Move the call to proceed_question() from check_plausibility() to its
caller. This allows more fine grained control by mke2fs about when it
might want to call check_plausibility().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
83c469bc33e94dc680cacde3e7b12bbdb3b085af 26-Apr-2014 Theodore Ts'o <tytso@mit.edu> mke2fs: don't ask the proceed question using a regular file

Very often people are creating file systems using regular files, so we
shouldn't ask the user to confirm using the proceed question.
Otherwise it encourages users to use the -F flag, which is a bad
thing.

We do need to continue to check if the external journal device is a
block device.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
71715a5a9ad409df162dbb58a4c3b6fd2c5868d5 14-Apr-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
d8f401b13568389ac0f67af0c653f153b5f0bd09 14-Apr-2014 Andreas Dilger <andreas.dilger@intel.com> fix miscellaneous build warnings

Fix various unused variable and use-uninitialized warnings.

Add generated files into .gitignore.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
716a3c3536f87372ce16b5b678b9957dabf6d638 03-Mar-2014 Zheng Liu <wenqing.lz@taobao.com> libext2fs: handle inline_data in block iterator function

After applied this commit (a7f4c635), we have banned to traverse blocks
for an inode which has inline data because no block belongs to it. But
before calling this function, we need to check inline data flag. This
commit add a sanity check ext2fs_inode_has_valid_blocks2() to fix them
except that ext2fs_expand_dir because it will be fixed by another patch.

Meanwhile in this commit it fixes a bug that when we kill a file we
could leak an inode.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
dc084ab7b1952c40ef223c8f9b54457716582cd6 21-Feb-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
5fe2bd60844cfe5d805e62a4316afaa5cd9d7c83 21-Feb-2014 Eric Sandeen <sandeen@redhat.com> tune2fs: allow removal of dirty journal with two "-f" options

Jim pointed out that "tune2fs -f -O ^has_journal" won't remove the
journal if the needs_recovery flag is set; the manpage seems to indicate
that it should. And if you've lost an external journal and can no longer
replay it, how should one proceed?

Change tune2fs so that two "-f" options will allow removal of a dirty
journal from a filesystem, even if the filesystem needs recovery.

e2fsck can then do its best to pick up the pieces.

Addresses-Debian-Bug: #559301

Reported-by: Jim Faulkner <james.faulkner@yale.edu>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
4d46e6c737947b336fd412f43c060955b07bd319 18-Feb-2014 Andreas Dilger <adilger@dilger.ca> build: fix LLVM compiler warnings

Fix a number of non-literal string format warnings from LLVM due
to the use of _() that were not fixed in commit 45ff69ffeb.

Fix mismatched int vs. __u64 format warnings in blkmap64_rb.c.
There were also some comparisons of __u64 start or count <= 0.
Change them to be comparisons == 0, or start + count overflow.

Fix operator precedence warning for (value & (value - 1) != 0)
introduced in 11d1116a7c0b. It seems "&" is lower precedence
than "!=", so the above didn't fail for power-of-two values,
but only odd values. Fortunately, either s_desc_size nor
s_inode_size is valid if odd.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
d5fc19fc96a03bed964c7bd995202dfc88f6c4de 06-Feb-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
9e7294d391ad39e6ed755c56f38dee192ca7ccd4 06-Feb-2014 Akira Fujita <a-fujita@rs.jp.nec.com> e2fsprogs: Disallow tune2fs enabling sparse_super with ext4 meta_bg enabled

When meta_bg feature is enabled, group descriptor block is allocated
every 128 block group (or every 64 block group if 64bit feature is
enabled).

In such situation, files in block group more than #128 will be removed
if sparse_super feature is enabled with tune2fs and afterwards
necessary e2fsck running.

Because tune2fs does not reallocate group descriptor blocks but just
set sparse_super feature. If ext4 has sparse_super,
ext2fs_descriptor_block_loc2() called by e2fsck thinks the block group
(e.g. #128) that it has group descriptor block at the head offset. But
that offset is used as backup super block before. So e2fsck fixes
ext4 based on invalid group descriptor blocks and this cause data
lost.

The patch avoids this problem simply by disallow tune2fs enabling
sparse_super if meta_bg is enabled.

Steps to reproduce:

1. Create ext4 which has meta_bg, ^sparse_super and 129+ block groups.
# mke2fs -t ext4 -O meta_bg,^resize_inode,^sparse_super DEV 17G
# mount DEV /MP

2. Create direcotry and files which use block group #128's metadata.
# echo $((8192*128+1)) > /sys/fs/ext4/DEV/inode_goal
# mkdir /MP/DIR
# for i in $(seq 1 100); do dd if=/dev/urandom of=/MP/DIR/file$i bs=1024 count=10; done

3. Enable sparse_super with tune2fs then execute e2fsck.
Data in block group #128 will be lost!!
# umount DEV
# tune2fs -O sparse_super DEV
# e2fsck/e2fsck -yf DEV

Signed-off-by: Akira Fujita <a-fujita@rs.jp.ne.cocm>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
f0996c12d5f189be2fddafc4b2665345230b3826 31-Jan-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
lib/ext2fs/alloc.c
misc/mke2fs.c
b818205feb60f7a7bec5e325462294f586735215 28-Jan-2014 Theodore Ts'o <tytso@mit.edu> tune2fs, mke2fs: add the ability to control the location of the journal

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
abbf95c739cfad7990a67ce73d01f4b6626cb5fc 11-Jan-2014 Theodore Ts'o <tytso@mit.edu> tune2fs: add error checking to ext2fs_read_bitmaps() calls

Addresses-Coverity-Id: #1153628
Addresses-Coverity-Id: #1153629

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
72958b6670fa3ff126cd16c0821118e3a516c200 11-Jan-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
250bf9a7032fa13dad8eede903d17f3ec2e917de 11-Jan-2014 Theodore Ts'o <tytso@mit.edu> mke2fs, tune2fs: remove unneeded access() call

Addresses-Coverity-Id: #709536
Addresses-Coverity-Id: #709535

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
e4681bca170094430ef173b67345d2d8f0cfcea8 16-Dec-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
debugfs/debugfs.8.in
269da3b8068ecb0bdf8077b0f7b27f164203cb35 16-Dec-2013 Andreas Dilger <adilger@dilger.ca> ext2fs: quiet compiler warnings

Include ext2fsP.h in fileio.c for ext2fs_file_block_offset_too_big()
declaration. Fix up the declaration to mark it extern in the header.

Include <strings.h> header for strcasecmp() in tune2fs.c if available,
as described in the strcasecmp(3) man page, instead of doing this
indirectly by declaring _BSD_SOURCE and getting it from <string.h>.

If CONFIG_QUOTA is undefined, parse_quota_opts() is unused in
tune2fs.c so #ifdef it out.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
45ff69ffeb700012a7c052f5e45882557a40be7e 16-Dec-2013 Andreas Dilger <adilger@dilger.ca> build: quiet LLVM non-literal string format warning

Compiling with LLVM generates a large number of warnings due
to the use of _() for wrapping strings for i18n:

warning: format string is not a string literal
(potentially insecure) [-Wformat-security]
./nls-enable.h:4:14: note: expanded from macro '_'
#define _(a) (gettext (a))
^~~~~~~~~~~~

These warnings are fixed by using "%s" as the format string,
and then _() is used as the string argument.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
2b24aadee872b8200729db479a6418a9d7f83794 15-Dec-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
misc/tune2fs.c
66457fcb842300e757a69c49c2eb4d8e335be34c 15-Dec-2013 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: forbid changing uuid on an uninit_bg filesystem

The old uninit_bg checksums depend on the UUID, so prohibit changes to
the UUID if a checksumming filesystem is mounted, because this
introduces a nasty race where the kernel and tune2fs are both trying
to rewrite group descriptors at the same time, with different ideas
about what the UUID is.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
1586850bcd716e7e99825bd0a9a138f8618e2305 14-Oct-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
d82445e903be682e09c41607ed5f7b338cb8c1b0 14-Oct-2013 Eric Sandeen <sandeen@redhat.com> tune2fs: more respect for quota config option

Commit 44a2cca3 disabled tune2fs -O quota when the build
didn't have --enable-quota at configure time, but that
wasn't quite enough.

We need to exclude the "-Q" option as well from tune2fs
when --enable-quota isn't specified at configure time.

Otherwise, tune2fs -Q can set the quota feature, but no other
utility will touch the filesystem due to the unknown flag,
if buitl w/o --enable-quota.

So put everything related to "-Q" under #ifdef CONFIG_QUOTA;
usage output (was missing before) and option parsing.

Addresses-Red-Hat-Bugzilla: #1010709
Reported-by: Bert DeKnuydt <Bert.Deknuydt@esat.kuleuven.be>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
45e9ccdbb37166845f0ffc2faa3c678d1a32ae49 13-Oct-2013 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: don't convert block # to cluster # when clearing uninit_bg

When we're constructing the initial block bitmap as part of removing
the gdt_csum (i.e. uninit_bg) feature, we mustn't convert the block
numbers to cluster numbers because ext2fs_mark_block_bitmap2() does
this for us.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
e337e7fad8d9f29ea6a7436b40361f3a1a17a6af 13-Oct-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
e2fsck/problem.c
e2fsck/rehash.c
e2fsck/super.c
4dbfd79d1458ce1259b951377e341aeb6197f8c1 07-Oct-2013 Darrick J. Wong <darrick.wong@oracle.com> e2fsprogs: fix blk_t <- blk64_t assignment mismatches

Fix all the places where we should be using a blk64_t instead of a
blk_t. These fixes are more severe because 64bit values could be
truncated silently.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
fa58fa530a1c2f71f8ace81dca9f4b73774bf777 16-Sep-2013 Darrick J. Wong <darrick.wong@oracle.com> tune2fs: zero inode table when removing checksums

When disabling group checksums, we have to initialize the inode table. Right
now tune2fs doesn't do this; it merely punts to e2fsck to clean up the mess.
Unfortunately, if the "uninitialized" inode table contains things that look
like inodes (i_link_count > 0, specifically), the e2fsck tries to recover these
inodes. This leads to it misinterpreting i_blocks as a block map, at which
point it needlessly resurrects phantom inodes and crosslinked file repairs. As
part of initializing the block bitmaps, we must also mark block group metadata
blocks in use.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
70f4632b626e3db94dd02c9dc9b4e643ffb0d048 08-Jun-2013 Jan Kara <jack@suse.cz> libext2fs: provide functions to safely access name_len and file_type

Accessing name_len (and file_type) in ext4_dir_entry structure is
somewhat problematic because on big endian architecture we need to now
whether we are really dealing with ext4_dir_entry (which has u16
name_len which needs byte swapping) or ext4_dir_entry_2 (which has u8
name_len which must not be byte swapped).

Currently the code is somewhat surprising and name_len is always
treated as u16 and byte swapped (flag EXT2_DIRBLOCK_V2_STRUCT isn't
ever used) and then masking of name_len is used to access real
name_len or file_type. Doing things this way in applications using
libext2fs is unexpected to say the least (more natural is to type
struct ext4_dir_entry * to struct ext4_dir_entry_2 * but that gives
wrong results on big endian architectures. So provide helper functions
that give endian-safe access to these fields. Also convert users in
e2fsprogs to use these functions.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
4cf7a7014a209b82aada9b5d83ecdb9b07e60a1a 20-May-2013 Theodore Ts'o <tytso@mit.edu> misc: fix gcc -Wall nits

[For 1.43 branch]

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
581ecb6d8808a083add919f066f44cf7e70f9c4a 20-May-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
e2fsck/pass1b.c
e2fsck/rehash.c
lib/ext2fs/crc32c.c
lib/ext2fs/gen_bitmap64.c
misc/tune2fs.c
577c773a60fa7d167f5aaf717fadd20fe507fb97 20-May-2013 Theodore Ts'o <tytso@mit.edu> misc: fix gcc -Wall warnings

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
07bcd90f3dab9a7907081dc455e089f92b9dd0a1 22-Apr-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
fab0d286ec8539988551271c5faa864ea38dc4d4 22-Apr-2013 Akira Fujita <a-fujita@rs.jp.nec.com> tune2fs: disallow tune2fs to set inode size larger than block size

Disallow tune2fs command to set the inode size to be larger than the
block size. Without this patch, tune2fs makes the file system to be
unmountable.

Steps to reproduce:

1.Create ext4 without flex_bg (or just create ext3)
# mke2fs -t ext4 -O ^flex_bg DEV

2.Set inode size larger than block size
# tune2fs -I 8192 DEV

3. We failed to mount FS
# mount DEV MP
mount: wrong fs type, bad option, bad superblock on /dev/sda7,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
1b8c4c1b45482363e29bd4cca483d84645f8ac9d 23-Jan-2013 Andreas Dilger <adilger@dilger.ca> build: quiet build warnings for "gcc -Wall"

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
fca8b1b2416c384b91b4fe00d6d37cfccb8fb3d5 22-Jan-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
RELEASE-NOTES
version.h
a713a7fe5a929c0e1307e6bded8ac66805c7e748 22-Jan-2013 Theodore Ts'o <tytso@mit.edu> mke2fs, tune2fs, resize2fs: add warning messages for bigalloc and quota

The bigalloc and quota features have some known issues, so issue
warnings in case users try to use them.

More information can be found here:
https://ext4.wiki.kernel.org/index.php/Bigalloc
https://ext4.wiki.kernel.org/index.php/Quota

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
b9b5e43ea81ecf575e3d96cbf51215aba3746b32 02-Jan-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
RELEASE-NOTES
debian/changelog
lib/ext2fs/crc32c.c
lib/ext2fs/rw_bitmaps.c
resize/resize2fs.c
version.h
e3507739e4185bdb2394928eb6479e48f4e690a8 01-Jan-2013 Theodore Ts'o <tytso@mit.edu> Fix gcc -Wall nits

This fixes the last set of gcc -Wall complaints.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
ccea20f62d592d765380d71508c999d9a26a20c1 30-Nov-2012 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
misc/tune2fs.c
0f8186598ccb0c5e8666b6efe7178c69e73d81b6 29-Nov-2012 Theodore Ts'o <tytso@mit.edu> tune2fs: fix a compile-time bug if quota is not enabled

Commit 44a2cca35e introduced a compile-time failure if --enable-quota
is not passed to the configure script.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
44a2cca35e9292c39bcad38288fdf7a78d6f56af 27-Nov-2012 Eric Sandeen <sandeen@redhat.com> tune2fs: respect quota config option

If we haven't turned --enable-quota on at config time,
I don't think tune2fs should know about the feature either.

Today we can actually tune2fs -O quota even if not
configured on, and then the rest of the tools will
refuse to touch it:

# tune2fs -O quota /dev/sda1
# tune2fs -O ^quota /dev/whatever complains
tune2fs 1.42.3 (14-May-2012)
tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/sda1
# fsck /dev/sda1
fsck from util-linux 2.21.2
e2fsck 1.42.3 (14-May-2012)
/dev/sda1 has unsupported feature(s): quota
e2fsck: Get a newer version of e2fsck!

Ok, so turn it off?
# tune2fs -O ^quota /dev/whatever complains
tune2fs 1.42.3 (14-May-2012)
tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/sda1

Nope. Debugfs? Nope.

# debugfs -w /dev/sda1
debugfs 1.42.3 (14-May-2012)
/dev/sda1: Filesystem has unsupported read-only feature(s) while opening filesystem

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reported-by: Bert DeKnuydt <Bert.Deknuydt@esat.kuleuven.be>
Addresses-Red-Hat-Bugzilla: #880596
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
ef1232b42a1c15505e69fc246b3d61cb7036feaf 03-Aug-2012 Darrick J. Wong <djwong@us.ibm.com> tune2fs: force MMP update when changing metadata_csum flag

When changing the metadata_csum flag, always force out a new MMP block.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
9d25f643efc1b7845f0199a67d4f8220ad395353 03-Aug-2012 Darrick J. Wong <djwong@us.ibm.com> tune2fs: rewrite block group checksums when changing checksumming feature flags

When toggling the metadata_csum and uninit_bg feature flags, we should
rewrite the block groups with the desired checksum.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
022c81aa194461d191c58254ad710bc617bcf05e 03-Aug-2012 Darrick J. Wong <djwong@us.ibm.com> tune2fs: store checksum algorithm type in superblock

Actually records the checksum algorithm type in the superblock when
enabling checksumming.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
fa0ecf18f5f588f144ad5e022787c9ac5b5c0f2a 03-Aug-2012 Darrick J. Wong <djwong@us.ibm.com> tune2fs: rewrite extended attribute block checksums

When enabling metadata checksums, rewrite separate extended attribute
blocks.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
761b76a4c74ae3182648e80c210bad933236d928 03-Aug-2012 Darrick J. Wong <djwong@us.ibm.com> tune2fs: rebuild and checksum directories when necessary

Since all the metadata checksums depend on the fs UUID, tune2fs must
be able to rewrite the checksums of _all_ metadata. It's not that
hard to add in the bits to resize the directory block structures at
the same time.

[ Merged in fix from Zheng Liu where ctx.errcode wasn't getting
cleared in rewrite_directory(). ]

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
7cf0485d5ddf9314d46ac2c27f45ef8cdb883b96 31-Jul-2012 Darrick J. Wong <djwong@us.ibm.com> tune2fs: enable extent tree checksums

Add to tune2fs the ability to recalculate extent tree checksums when
altering the metadata checksum feature flag.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
544058f26159112f69d421a449dc559dce688c2f 31-Jul-2012 Darrick J. Wong <djwong@us.ibm.com> tune2fs: rewrite block bitmap checksums

When toggling metadata_csum, mark the block bitmap dirty so that it
gets written with new checksums.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
9038bdb359e0ee7f0a25d2447e02796f34090725 31-Jul-2012 Darrick J. Wong <djwong@us.ibm.com> tune2fs: rewrite inode bitmap checksums

When toggling metadata_csum, mark the inode bitmap dirty so that they
are written out with new checksums.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
7178b57115b949a91d5171e6d83e660cd8f7b2a7 31-Jul-2012 Darrick J. Wong <djwong@us.ibm.com> tune2fs: add inode checksum support

This patch adds to tune2fs the ability to toggle the metadata checksum
rocompat feature flag, which will rewrite the inode table with
checksums. Disallow changing the UUID while the fs is mounted,
because rewriting the metadata objects is racy.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
89dd15db9fbcf289afca24751fb463245c5c6aee 14-Jul-2012 Aditya Kali <adityakali@google.com> tune2fs: fix quota feature removal

When the last quota inode is removed, the 'quota' feature
flag was not removed from superblock in some cases.
Ex:
$ mke2fs -t ext4 -O quota <dev> # creates both usr & grp
# quota inodes
$ tune2fs -Q ^usrquota <dev> # removes usr quota inode
$ tune2fs -Q ^grpquota <dev> # removes grp quota inode,
# but the 'quota' feature flag
# was not removed from superblock
This patch removes the 'quota' feature flag from superblock
if none of the quota inodes are set.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
5027751530980c61e313d265b1367fee90589cf4 14-Jul-2012 Aditya Kali <adityakali@google.com> tune2fs/quota: always create hidden quota files

Currently 'tune2fs -O quota <dev>' will try to use existing
quota files and write their inode numbers in the superblock.
Next e2fsck run then converts these into hidden quota inodes
(ino #3 & #4). But this approach has problems:
1) Before e2fsck run, the inodes are visible to the user and
might get corrupted or removed or replaced by the user.
2) Since these are user visible, we have to include
their block usage in the quota accounting. But once
these inodes are hidden, e2fsck will have to decrement
their usage from the quota accounting (which e2fsck
currently doesn't do and instead reports error).
(the following used to give e2fsck error previously:
# assume <dev> has aquota.user & aquota.group files
$ tune2fs -O quota <dev> # stores ino# of quota files in
# ext4 superblock
$ e2fsck -f <dev> # hides quota files, but now quota
# usage is incorrect.
<< quota errors >>
Instead of making e2fsck complicated, this patch creates the
hidden quota inodes at 'tune2fs -O quota' time iteself. The
usage is computed freshly and limits are copied from the
aquota.user and aquota.group files as earlier.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
e64e6761aa22f31123a91206a5686526f7b9c6c0 05-Apr-2012 Theodore Ts'o <tytso@mit.edu> Fix gcc -Wall nitpicks

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
24dea55494ea753dbc8e4d965345cd2a7144d4fd 15-Mar-2012 Theodore Ts'o <tytso@mit.edu> Use rbtree bitmaps for dumpe2fs, debugfs, and tune2fs

For large file systems, using the rbtree bitmap can save a lot of
memory.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
cdfaa75901a66d02fa23f100e0346934371c3753 14-Nov-2011 Niu <niu@whamcloud.com> tune2fs: preserve old limits when turn on quota feature

When turn on quota by tune2fs, if the old quota file exist, the quota
usage should be recomputed but the old limits should be preserved.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
d7c6f4e6d067a3547379acb0d7ef9e95038bef28 14-Nov-2011 Aditya Kali <adityakali@google.com> tune2fs: Compute quota usage when turning on the 'quota' feature

When turning on the quota feature, tune2fs would create empty quota inodes and
set their inode numbers in superblock. This required e2fsck to be ran before
using the quota feature. This patch adds adds call to compute_quota() and make
sure that we write correct quota information in the quota files at tune2fs time
itself. This gets rid of the necessity for running e2fsck after setting the
quota feature. Also, tune2fs now does not use existing old quota files
(aquota.user and aquota.group) even if they exist.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
a86d55da8bf41335aa2fc5ec16ca63859d918e81 14-Nov-2011 Aditya Kali <adityakali@google.com> libquota: cleanup libquota code

This patch cleans up the quota code as suggested in previous reviews. This
includes
* remove BUG_ON()s and 'exit()' calls from library code
* remove calls to malloc/free and instead use ext2fs_get/free_mem functions.
* lib/quota/common.c file in not needed anymore and is removed.
* rename exported functions to start with quota_
(ex: init_quota_context --> quota_init_context)
* better error handling in quota library

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
0c80c44bd08c60f3cd0ad87f12a71a75cac3bcaa 17-Oct-2011 Theodore Ts'o <tytso@mit.edu> libext2fs: ext2fs_[set_]file_acl_block needs to check for 64-bit feature flag

The ext2fs_file_acl_block() and ext2fs_set_file_acl_block() needs to
only check i_file_acl_high if the 64-bit flag is set. This is needed
because otherwise we will run into problems on Hurd systems which
actually use that field for h_i_mode_high.

This involves an ABI change since we need to pass ext2_filsys to these
functions. Fortunately these functions were first included in the
1.42-WIP series, so it's OK for us to change them now. (This is why
we have 1.42-WIP releases. :-)

Addresses-Sourceforge-Bug: #3379227

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
3fcd8fe8acb269598390b35bbf6e4247d10bc64e 09-Oct-2011 Theodore Ts'o <tytso@mit.edu> Fix more spelling errors found by translators and add pluralization

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
9d4507c5b61007df968638623aa1b4c47dae6cf9 05-Oct-2011 Theodore Ts'o <tytso@mit.edu> Pass the gettext() function to libcom_err

For those e2fsprogs programs which use libcom_err and are
internationalized, pass the gettext() function to libcom_err during
program initialization.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
36e4e21f511423450285568ceb26b3ddb233e286 04-Oct-2011 Theodore Ts'o <tytso@mit.edu> libquota: remove get_qf_name()

The get_qf_name() function used PATH_MAX, which is non-portable.
Worse, it blindly assumed that PATH_MAX was the size of the buffer
passed to it --- which in the one and only place where it was used in
libquota, was a buffer declared to a fixed size 256 bytes.

Fix this by simply getting rid of the function altogether.

Cc: Aditya Kali <adityakali@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
0f5eba7501f467f757792ee449d16c9259b994fd 24-Sep-2011 Andreas Dilger <adilger@whamcloud.com> ext2fs: add multi-mount protection (INCOMPAT_MMP)

Multi-mount protection is feature that allows mke2fs, e2fsck, and
others to detect if the filesystem is mounted on a remote node (on
SAN disks) and avoid corrupting the filesystem. For e2fsprogs this
means that it checks the MMP block to see if the filesystem is in use,
and marks the filesystem busy while e2fsck is running on the system.

This is useful on SAN disks that are shared between high-availability
servers, or accessible by multiple nodes that aren't in HA pairs. MMP
isn't intended to serve as a primary HA exclusion mechanism, but as a
failsafe to protect against user, software, or hardware errors.

There is no requirement that e2fsck updates the MMP block at regular
intervals, but e2fsck does this occasionally to provide useful
information to the sysadmin in case of a detected conflict.

For the kernel (since Linux 3.0) MMP adds a "heartbeat" mechanism to
periodically write to disk (every few seconds by default) to notify
other nodes that the filesystem is still in use and unsafe to modify.

Originally-by: Kalpak Shah <kalpak@clusterfs.com>

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
6747ac86b9b4eac864af768a2fa09b8a22e363a5 24-Sep-2011 Andreas Dilger <adilger@whamcloud.com> tune2fs: miscellaneous whitespace fixups

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
d90d6a71460d2e3fd57607f90f9abbd1e7d77e3b 24-Sep-2011 Andreas Dilger <adilger@whamcloud.com> tune2fs: kill external journal if device not found

Continue to remove the external journal device even if the device
cannot be found.

Add a test to verify that the journal device/UUID are actually removed
from the superblock. It isn't possible to use a real journal device
for testing without loopback devices and such (it must be a block device)
and this would invite complexity and failures in the regression test.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
6b56f3d92d08806ab415e8fd883480f7f9c148e8 24-Sep-2011 Andreas Dilger <adilger@whamcloud.com> misc: quiet minor compiler errors

Several compiler errors are quieted:
- zero-length gnu_printf format string
- unused variable
- uninitalized variable (though it isn't actually used for anything)
- fixed a bug in ext2fs_stat() if stat64() does not exist

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
d1154eb460efe588eaed3d439c1caaca149fa362 18-Sep-2011 Theodore Ts'o <tytso@mit.edu> Shorten compile commands run by the build system

The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and
this was starting to cause some tools heartburn. It also made "make
V=1" almost useless, since trying to following the individual commands
run by make was lost in the noise of all of the defines.

So fix this by putting the configure-generated defines in lib/config.h
and the directory pathnames to lib/dirpaths.h.

In addition, clean up some vestigal defines in configure.in and in the
Makefiles to further shorten the cc command lines.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
c3ecabe61d075efa1b3f451964f85f3157307f8d 16-Sep-2011 Eric Sandeen <sandeen@redhat.com> tune2fs: handle inode and/or block bitmap read failures in resize_inode()

Handle these failures in resize_inode, and handle the propagated
error in the caller.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
faa2dcdad0f5af3945a70bdecc8713b3a74cdf9c 14-Sep-2011 Lukas Czerner <lczerner@redhat.com> mke2fs: Use ext2fs_flush() only once

We are doing ext2fs_flush() twice right now at the end of the mke2fs.
First by directly calling ext2fs_flush() which is intended to write
superblock and fs accounting information. And then it is invoked again
when we are calling ext2fs_close(), only this time, because the fs is
not dirty, we are writing out only superblock.

I think it is bad to call it twice because even when writing only super
block it takes some time on bigger file systems and moreover
ext2fs_close() can fail without any reasonable explanation for the user.
Also ext2fs_flush() is printing out progress and it is confusing for the
users.

Fix all this by removing the ext2fs_flush() and leaving it all to
ext2fs_close(). However we need to introduce new variables to store
check interval and max mount count, because fs structure is freed on
ext2fs_close() and we really want to print those information as the last
info for the user.

[ Fixed type mismatch in a printf format statement -tytso]

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
771e8db9f04da550ee7c0ca74b198e989ea4ff35 20-Jul-2011 Aditya Kali <adityakali@google.com> tune2fs: Add support for turning on quota feature

This patch adds support for setting the quota feature in superblock
and allows selectively creating quota inodes (user or group or both)
in the superblock. Currently, modifying the quota feature is only
supported when the filesystem is unmounted.
Also, when setting the quota feature, tune2fs will use aquota.user or
aquota.group file inode number in superblock if these files exist.
Otherwise it will initialize empty quota inodes #3 and #4 and use them.

Here is how it works:
# Set quota feature and initialize both (user and group) quota inodes
$ tune2fs -O quota /dev/ram1

# Enable only one type of quota
$ tune2fs -Q usrquota /dev/ram1

# Enable grpquota, disable usrquota
$ tune2fs -Q ^usrquota,grpquota /dev/ram1

# Clear quota feature and remove quota inodes
$ tune2fs -O ^quota /dev/ram1

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
f37901a22d618916b53105e39ff91a8bb84d67bc 05-Jul-2011 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
misc/tune2fs.c
9a976ac732a7e9c3d9bf7ccb18190b93b588cb6d 05-Jul-2011 Theodore Ts'o <tytso@mit.edu> tune2fs: Fix mount_opts handling

The extended options parsing for mount_opts was horribly buggy.
Invalid mount options that had an argument would get interpreted as an
extended mount options. Fix this.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
035f32ab17e53c632b9b6a34fb6416ae714bf3ab 05-Jul-2011 Theodore Ts'o <tytso@mit.edu> tune2fs: allow setting the stride and stripe width to zero

Tune2fs previously would give an error if the user tried setting the
stride and stripe-width parameters to zero; but this is necessary to
disable the stride and stripe-width settings. So allow setting these
superblock fields to zero.

Addresses-Google-Bug: #4988557

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
fe75afbf33389f71f8588af388d0c01db0cbf753 16-Jun-2011 Theodore Ts'o <tytso@mit.edu> Fix superblock field s_blocks_count for bigalloc file systems

Treat the s_blocks_count field in the superblock as a free block count
(instead of the number of free clusters) for bigalloc file systems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
cf5301d7f2c3bbed3d26600335102414cbf0c4ba 11-Jun-2011 Andreas Dilger <adilger@whamcloud.com> misc: clean up compiler warnings

Fix several types of compiler warnings (unused variables/labels),
uninitialized variables, etc that are hit with gcc -Wall.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
3977a4ff5b6d8f1a2a15d267308c52d42f31ba01 01-Jun-2011 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
misc/tune2fs.c
2972b1637654e0c6ca0d7201384331dc250b2dc8 18-Apr-2011 Kazuya Mio <k-mio@sx.jp.nec.com> tune2fs: Fix overflow of interval check

Add the check of maximum check interval.
s_checkinterval is 32bit variable, so it cannot be set more than 2^32.

Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
b1503c446a9cd3041c94945df7a9772e812dbd21 18-Apr-2011 Kazuya Mio <k-mio@sx.jp.nec.com> e2fsprogs: Unify the upper limit of reserved blocks count

In e2fsprogs, the upper limit of reserved blocks count is a half of
filesystem's blocks count. This patch fixes the incorrect checks of
reserved blocks count.

Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
9d92a201deec7bbb1911e6e5ee98abf3c83882d4 25-Sep-2010 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
configure
configure.in
lib/ext2fs/ext2fs.h
misc/mke2fs.c
9345f02671fd39cad69338080b62e12e8b86671d 19-Sep-2010 Theodore Ts'o <tytso@mit.edu> 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>
/external/e2fsprogs/misc/tune2fs.c
7117f8d6c5fc851a393a970e71337ef61bf0a8f0 13-Jun-2010 Valerie Aurora Henson <vaurora@redhat.com> tune2fs: Fix up to be 64-bit block number safe

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
97d26ce9e3589e9f5fa17014467a9730a884d158 07-Jun-2010 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
e2fsck/journal.c
e2fsck/pass1.c
e2fsck/pass2.c
misc/mke2fs.c
079ad63d59a0b4c9bc3242117ce9b3d97d9dd711 19-May-2010 Theodore Ts'o <tytso@mit.edu> 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>
/external/e2fsprogs/misc/tune2fs.c
b49f78fe6e19fe63b6f989d5e1afb04f59069197 26-Oct-2009 Theodore Ts'o <tytso@mit.edu> Convert ext2fs_group_{first,last}_block() to *block2()

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
6493f8e85defc568a4ca8cdb4a53361f36fb94ba 26-Oct-2009 Theodore Ts'o <tytso@mit.edu> Convert ext2fs_group_of_blk() to ext2fs_group_of_blk2()

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
d7cca6b06f366f998ed43346f9b6fca9e163692f 26-Oct-2009 Valerie Aurora Henson <vaurora@redhat.com> Convert to use block group accessor functions

Convert direct accesses to use the following block group accessor
functions: ext2fs_block_bitmap_loc(), ext2fs_inode_bitmap_loc(),
ext2fs_inode_table_loc(), ext2fs_bg_itable_unused(),
ext2fs_block_bitmap_loc_set(), ext2fs_inode_bitmap_loc_set(),
ext2fs_inode_table_loc_set(), ext2fs_bg_free_inodes_count(),
ext2fs_ext2fs_bg_used_dirs_count(), ext2fs_bg_free_inodes_count_set(),
ext2fs_bg_free_blocks_count_set(), ext2fs_bg_used_dirs_count_set()

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: Nick Dokos <nicholas.dokos@hp.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
4efbac6fed75c29d3d5f1b676b932754653a2ac5 08-Sep-2009 Valerie Aurora Henson <vaurora@redhat.com> Convert uses of super->s_*_blocks_count to ext2fs_*_blocks_count()

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: Nick Dokos <nicholas.dokos@hp.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
a63745e81cbb476b90c75ca3ca60b9ba4be95cae 08-Sep-2009 Valerie Aurora Henson <vaurora@redhat.com> Use ext2fs_file_acl_block() instead of using .i_file_acl directly

This provides support for 48-bit file acl blocks.

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
24a117abd0340d247befbf7687ffb70547fdf218 08-Sep-2009 Valerie Aurora Henson <vaurora@redhat.com> Convert to use io_channel_read_blk64() and io_channel_write_blk64()

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
3c041a514cf65c65e102ff22e0dee2a3fa724873 23-Aug-2009 Valerie Aurora Henson <vaurora@redhat.com> Convert tune2fs, dumpe2fs, and e2image to the new bitmap interface

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
154a5d7537c35959aa646ef8f18daed8c9f1a2be 06-Aug-2009 Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> tune2fs: handle bad blocks when resizing inodes

When increasing inode size if we find that the new block
that we needed to increase the inode table size is a bad
block we fail. This make sure we don't end up with a corrupt
file system when doing inode resize on a file system having
bad blocks.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
91fac97938f0ad8c9f0e2c75feec689ca12105e3 06-Aug-2009 Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> tune2fs: Handle fs meta-data blocks during inode resize

With file system formated for RAID arrays we can have inode bitmap
and block bitmap after inode table. Make sure we move them around
properly when doing inode resize.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
a9e5177be906eb9b22a67f7703e1fe10da231c49 06-Aug-2009 Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> tune2fs: Make e2fsprogs handle ENOSPC better with inode resize

This removes the metadata block bitmap and makes the error handling
simpler. It also check for the enospc with the correct number needed
blocks. Also added specific error messages. We need to run e2undo
only if we start modiyfing inode, group desc and inode table.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
3c77b8ec54247f566c7912e1c5733147afeeacac 12-Jul-2009 Theodore Ts'o <tytso@mit.edu> Fix miscellaneous gcc -Wall warnings in blkid and tune2fs

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
1acde2b2776fca4d9386a04909296c2e6b11f242 15-Jun-2009 Theodore Ts'o <tytso@mit.edu> dumpe2fs, tune2fs: fix miscellaneous memory leaks

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
9266fc7a2fe49c6de871016772a2120830e183a9 22-Apr-2009 Theodore Ts'o <tytso@mit.edu> tune2fs: Fix format string warnings

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
14b596d40997c7e55ec8928bd222787f96808a2b 22-Apr-2009 Theodore Ts'o <tytso@mit.edu> configure.in: add --disable-libblkid option

Add an option to switch between the private (in-tree) libblkid and
public (in-system installed) library. The private version is still
enabled by default.

If --disable-libblkid is specified the findfs(8) program, which is a
variant of tune2fs, is also not built or installed.

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
f203bbdbec396e3279bf249ae9be96e6b00bf6f2 18-Apr-2009 Theodore Ts'o <tytso@mit.edu> e2fsck, tune2fs: Fix Hurd compilation problem due to lack of PATH_MAX

Hurd doesn't define PATH_MAX, so calculate the exact size needed for
the tdb filename, and allocate it dynamically.

Addresses-Debian-Bug: #521602

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
45e338f5332a54295893dba2e32cc093d1316f60 23-Feb-2009 Jim Meyering <jim@meyering.net> remove useless if-before-free tests

In case you're wondering about whether this change is safe from a
portability standpoint, fear not. This has been beaten to death
in other forums. Here are a few threads:

http://thread.gmane.org/gmane.comp.version-control.git/74187
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/12712
http://thread.gmane.org/gmane.emacs.devel/98144
http://thread.gmane.org/gmane.comp.lib.glibc.alpha/13092

There has been debate about whether it's a good idea from a
performance standpoint, too, but imho you'll have a hard time
finding an instance where this sort of change induces a
measurable performance penalty. If you do, please let me know.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
8d8224550c1f5b5c77afbf5acd95f73979276a0a 06-Mar-2009 Theodore Ts'o <tytso@mit.edu> mke2fs, tune2fs: Do not allow the reserved_ratio to be negative

Add a check to make sure the argument to the -m option (which
specifies the reserved ratio) is greater than zero.

Addresses-Debian-Bug: #517015

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
31f1815fa9a1b7ca41afdf6d364a6474eba8b6d1 20-Jan-2009 Theodore Ts'o <tytso@mit.edu> tune2fs: Fix tune2fs -I so it won't corrupt RAID filesystems

If a filesystem is built with the stride extended-option (which is
often used in RAID filesystems to make sure the block and inode
allocation bitmaps don't end up hitting one disk platter harder than
the rest), this can cause tune2fs -I to corrupt the filesystem because
it fails to handle the case where the allocation bitmaps are located
after the inode table, where the inode table needs to grow. Handle
this case correctly.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
ec43da2f35c54589e8aa0663d9cf44f86895242a 20-Jan-2009 Theodore Ts'o <tytso@mit.edu> tune2fs: General (whitespace) cleanup

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
5bf81baea01a19ce48daee5db07f08c6a9655ab5 20-Jan-2009 Theodore Ts'o <tytso@mit.edu> tune2fs: Don't allow the -I option if the flex_bg feature is enabled

With flex_bg usually the inode table for most block groups are packed
right against each other, so expanding the inode table size needs
special handling that's not currently in tune2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
27c6de45a4187a348ec0960472d4a113ee6ea425 15-Nov-2008 Theodore Ts'o <tytso@mit.edu> tune2fs: Fix inefficient O(n**2) algorithms when expanding the inode size

When running "tune2fs -I 256" on moderate to large filesystems, the
time required to run tune2fs can take many hours (20+ before some
users gave up in disgust). This was due to some O(n**2) and O(n*m)
algorithms in move_block() and inode_scan_and_fix(), respectively.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
9d4a4dc2870c46c74f815ec2bebe10b4701accf2 14-Nov-2008 Theodore Ts'o <tytso@mit.edu> tune2fs: Update the block group checksums when changing the UUID

Since the block group checksums depend on the UUID, we need to update
the block group checksums when setting the UUID. We only do so if all
of the checksums are correct, however.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
f38cf3cb34addaa53d1f855d7607b151082a4229 01-Sep-2008 Theodore Ts'o <tytso@mit.edu> Only use the test_io manager if the right environment variables are set

In order to make it possible for the test_io manager to be compiled in
by default, make all of the programs that might try to use it to only
do so if the environment variables TEST_IO_FLAGS and TEST_IO_DEBUG are
set.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
10ff68d42d06953c35459a0d949862e6aafa19f8 30-Aug-2008 Theodore Ts'o <tytso@mit.edu> tune2fs: Add support for setting the default hash algorithm for htree

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
d1070d91b4de8438dc78c034283baaa19b31d25e 29-Aug-2008 Theodore Ts'o <tytso@mit.edu> tune2fs, mke2fs: Change default directory hash algorithm to half_md4

The half_md4 algorithm is faster and more collision resistant. Let's
switch to it as the default.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
efc6f628e15de95bcd13e4f0ee223cb42115d520 28-Aug-2008 Theodore Ts'o <tytso@mit.edu> Remove trailing whitespace for the entire source tree

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
d887f88d220317aa05e6007be9eb19a3b654ece2 27-Jul-2008 Theodore Ts'o <tytso@mit.edu> tune2fs: Improve the error messages for tune2fs -I

If the current inode size is less than or equal to the requested inode
size, either explain that shrinking the inode size is not supported,
or that the inode is already the requested size. Also, open the
filesystem provisionally first to do the inode size check and don't
setup up the undo log until we know that we're actually going to
perform the inode resizing operation.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
7a0516a385d87a508843b21a1932b689697d9ffa 17-Jul-2008 Benno Schulenberg <bensberg@justemail.net> tune2fs: Delete a stray word from a comment.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
577b5c436f1531d4d14bcba1bc10e230dafc9fd1 17-Jul-2008 Benno Schulenberg <bensberg@justemail.net> e2undo, tune2fs: Report the correct name for the undo program.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
ebabf2ad6d19af5c674b624bafe619dedbc94403 13-Jul-2008 Theodore Ts'o <tytso@mit.edu> Define _XOPEN_SOURCE to 600 consistently for Solaris C99 support

Solaris's header files are very picky about which C compiler can be
used for SUSv3 conformance. Use of C99 is not compatible with SUSv2
(_XOPEN_SOURCE=500), and C89 is not compatible with SUSv3
(_XOPEN_SOURCE=600). Since we need some SUSv3 functions, consistently
use SUSv3 so that e2fsprogs will build on Solaris using c99.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
2be8fe43976537b75a6ee154ff3ba47e538b55fb 10-Jul-2008 Theodore Ts'o <tytso@mit.edu> mke2fs,tune2fs: Enable huge_file, dir_nlink, and extra_isize features

Also change mke2fs.conf to enable huge_file,dir_nlink,extra_isize, and
uninit_bg by default for ext4 filesystems, and enable extra_isize in
the library as well.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
71ff129e9f5c942ce4d2eb20e269100d15c1a6ae 18-Jun-2008 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint'

Conflicts:

README
resize/online.c
version.h
9ff8ece57d46a9419fc60057547810824881bb45 18-Jun-2008 Theodore Ts'o <tytso@mit.edu> mke2fs, tune2fs, resize2fs: Use floating point to calculate percentages

When calculating the number reserved blocks, use floating point for
better accuracy, since for big filesystems it really makes a
difference. In addition, mke2fs and tune2fs accepts a floating point
number from the user, so they should provide that level of accuracy.

Addresses-Debian-Bug: #452639

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
365857912e27914afa8857af5adf74ee19ca9e03 08-Jun-2008 Theodore Ts'o <tytso@mit.edu> Add "#include <limits.h>" to get PATH_MAX for mke2fs and tune2fs

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
721b367abf1fb65d4f048b34fdf91571a0ccfdd3 07-Jun-2008 Theodore Ts'o <tytso@mit.edu> Fix gcc -Wall warnings in tune2fs

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
64d588cfeac8f0125b2a29c8b61320ddab267391 13-Aug-2007 Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> tune2fs: Support for large inode migration.

Add new option -I <inode_size> to tune2fs. This is used to change the
inode size. The size need to be multiple of 2 and we don't allow to
decrease the inode size.

As a part of increasing the inode size we increase the inode table
size. We also move the used data blocks around and update the
respective inodes to point to the new block

tune2fs uses the undo I/O manager when migrating to large inode. This
helps in reverting the changes if end results are not correct. The
environment variable TUNE2FS_UNDO_DIR is used to indicate the
directory within which the tdb file need to be created. The file will
be named tune2fs-<device-name> If TUNE2FS_UNDO_DIR is not set
/var/lib/e2fsprogs is used

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
a70f10dbc493c4eae488cadd8512e873220037d9 30-Mar-2008 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint'
a2ff0f31c1987a480ffc4dacb7adf93f0aecf7f6 21-Mar-2008 Theodore Ts'o <tytso@mit.edu> debugfs, tune2fs: Handle daylight savings time when parsing a time string

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>
/external/e2fsprogs/misc/tune2fs.c
4e988cb4c16046c8c56dc3d76beb41466a966d81 22-Oct-2007 Jose R. Santos <jrs@us.ibm.com> Make tune2fs uninit block group aware

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
2d328bb76d2d63bdfdba923b54c28bd686bd8fec 18-Mar-2008 Theodore Ts'o <tytso@mit.edu> Fix miscellaneous gcc -Wall warnings

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
399033a6ab713bc1f8ebad90e47fced0e7491b62 29-Feb-2008 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint'
ff662d5dbf95f2e68eed6f6b6a4e10307a7d13bd 29-Feb-2008 Theodore Ts'o <tytso@mit.edu> 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>
/external/e2fsprogs/misc/tune2fs.c
a49670e64e28ac3b15e36cb6bd0a8135d3ecdbbb 28-Feb-2008 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint'

Conflicts:

lib/blkid/devname.c
lib/blkid/probe.c
misc/mke2fs.c
misc/tune2fs.c
558df54458075856b3a76051648323643a56dadc 27-Feb-2008 Theodore Ts'o <tytso@mit.edu> 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>
/external/e2fsprogs/misc/tune2fs.c
037914e28f69110020195fe9f9ea56e5274ff2c0 26-Feb-2008 Theodore Ts'o <tytso@mit.edu> 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>
/external/e2fsprogs/misc/tune2fs.c
885bf6b83252672eb2e9bd2fb6fd45a1978b0661 26-Feb-2008 Theodore Ts'o <tytso@mit.edu> 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>
/external/e2fsprogs/misc/tune2fs.c
7c4a2ef5946a52b9efa70b110d5abcf8f4fb6abe 26-Feb-2008 Theodore Ts'o <tytso@mit.edu> Teach tune2fs to use e2p_edit_feature2() to provide better error handling

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
107f291cdc9366717a9b2da66c8dcc3399b47409 20-Feb-2008 Theodore Ts'o <tytso@mit.edu> Add ability to set (but not clear) the extents feature to tune2fs

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
0157e7c635c845c0e636576206718d8abaf70e08 19-Feb-2008 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
0c17cb25f24730dca138a976a390f105d2191736 19-Feb-2008 Theodore Ts'o <tytso@mit.edu> 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>
/external/e2fsprogs/misc/tune2fs.c
43323be95742298b8229be728c3812e95c90629c 07-Feb-2008 Theodore Ts'o <tytso@mit.edu> Use BLOCK_FLAG_READ_ONLY flag in debugfs, e2image, and tune2fs

Pass BLOCK_FLAG_READ_ONLY to ext2fs_block_iterate2() so that debugfs,
e2image, and tune2fs will work well with filesystems containing
extents.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
ef80fdc8ad014c55e601018f4f6ec22065c37030 10-Feb-2008 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
0ddfd9a529d2d33f9c5b59fd7409b716e50d45b2 10-Feb-2008 Theodore Ts'o <tytso@mit.edu> Allow tune2fs to set and clear the test_fs flag on ext4 filesystems

Also allow the label to be set/cleared on ext4 filesystems via e2label
and tune2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
428f6b32a9029e1f0bc2559233954955a6aae64c 28-Jan-2008 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:

configure
lib/ext2fs/ext2_fs.h
misc/e2image.c
6cb27404f51f97e2665fa0e0c4c0f7bc47e698ec 27-Jan-2008 Theodore Ts'o <tytso@mit.edu> Add support for the test_fs flag

The test_fs flag is an "ok to be used with test kernel code" flag. It
makes it easier for us to determine whether a filesystem should be
mounted using ext4 or not.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
c2d4300b8a4a13d8a78b86c386f76259f23feec2 14-Aug-2007 Jose R. Santos <jrs@us.ibm.com> Enable FLEX_BG feature support

Add FLEX_BG as a supported feature bit.

Add support to mke2fs to create filesystems with FLEX_BG.

Add support to tune2fs to add (and remove, if it won't break
filesystem consistency) the FLEX_BG feature.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
--

lib/e2p/feature.c | 2 ++
lib/ext2fs/ext2fs.h | 6 ++++--
misc/mke2fs.c | 7 ++++++-
3 files changed, 12 insertions(+), 3 deletions(-)
/external/e2fsprogs/misc/tune2fs.c
058ad1c70c9a097d282270c6f76d3c3493e15fe2 19-Jun-2007 Theodore Ts'o <tytso@mit.edu> Don't write changes to the backup superblocks by default

This patch changes ext2fs_open() to set EXT2_FLAG_MASTER_SB_ONLY by
default. This avoids some problems in e2fsck (reported by Jim Garlick)
where a corrupt journal can end up writing the bad superblock to the
backups. In general, only e2fsck (after the filesystem is clean),
tune2fs, and resize2fs should change the backup superblocks by default.
Most callers of ext2fs_open() should not be touching anything where the
backups should be touched. So let's change the defaults to avoid
potential problems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
a6d8302b4873527798a77c1ba3106a04b71dfeac 26-Dec-2006 Theodore Ts'o <tytso@mit.edu> Use the newer add/remove_error_table com_err interfaces

Change all of the e2fsprogs programs to use the newer add_error_table()
and remove_error_table() interfaces instead of the much older
initialize_*_error_table() function.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
a8862d9e90d0d94761ba28dbbf9674308fd7d7c0 30-Aug-2006 Theodore Ts'o <tytso@mit.edu> Fix potential 2**32-1 overflow by using e2p_percent()

Add a new functiom, e2p_percent(), which correct calculates the percentage
of a number based on a given percentage, without worrying about overflow
issues. This is used where we calculate the number of reserved blocks using
a percentage of the total number of blocks in a filesystem.

Based on patches from Eric Sandeen, but generalized to use this new function.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
/external/e2fsprogs/misc/tune2fs.c
f51d0eff906a99addbc683d3d296edd16f11ced8 14-May-2006 Theodore Ts'o <tytso@mit.edu> Remove needless sanity check in tune2fs's -i option.

We were complaining with a confusing error message if the user tried to specify
a check interval larger than a 365 days. It's probably a bad idea if the user wants to
do this, but it's not worth it to complain.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/tune2fs.c
ce911145ed0fdd1918ee0c80d407c3e778dc64ee 06-Jul-2005 Andreas Dilger <adilger@clusterfs.com> Allow fractional percentages to the -m option in mke2fs and tune2fs

Allow the reserved blocks ratio to be specified in fractional
percentages.

Addresses-Debian-Bug: #80205
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
/external/e2fsprogs/misc/tune2fs.c
bb145b01cf5fd27d9afe03c3262d0e1a326e7ec1 20-Jun-2005 Theodore Ts'o <tytso@mit.edu> Fix e2fsprogs messages for grammar and consistency, based on suggestions
from Benno Schulenberg.

Add missing _() so all strings can be internationalized.
/external/e2fsprogs/misc/tune2fs.c
f35fd3d5eeb3e35660ea87adbc170978c3cdf9e3 09-May-2005 Theodore Ts'o <tytso@mit.edu> Fix some minor typo's and grammar's strings, and remove debugging strings
from needing to be translated. Patch is from Benno Schulenberg.
/external/e2fsprogs/misc/tune2fs.c
07f031fd1d76a4941d12bb5cc6d354fa4dd2c7a4 04-Feb-2005 Theodore Ts'o <tytso@mit.edu> Define _XOPEN_SOURCE to be 500 to fix compilation problems on Solaris.
/external/e2fsprogs/misc/tune2fs.c
32237014a1bd0ee2cdec9a54344f84c5c178c75f 18-Jan-2005 Theodore Ts'o <tytso@mit.edu> Various portability fixes for Solaris systems.
/external/e2fsprogs/misc/tune2fs.c
22ba4c1dedd61cef3f4e821a0bcfbceccc571a0f 06-Jan-2005 Theodore Ts'o <tytso@mit.edu> Make tune2fs and e2fsck consistent about allowing at most 50% of the blocks
in a filesystem to be reserved for allocation by the root user.
/external/e2fsprogs/misc/tune2fs.c
690e693cafa83eadbf7ce80291f53a7e89e9c2cc 22-Dec-2004 Theodore Ts'o <tytso@mit.edu> tune2fs.c (parse_time): Fix minor buglet; the parse_time routine
should use the passed-in argument, not optarg, even though
the two are the same in the case of the current caller of
said function. (i.e., no user-visible problems were caused
by this, even though the code was wrong).
/external/e2fsprogs/misc/tune2fs.c
2e8ca9a26b0bd7dae546a3f9a98df67b043fe3be 30-Nov-2004 Theodore Ts'o <tytso@mit.edu> Add support for passing options to the io layer using the URL syntax. For
example, /tmp/test.img?offset=1024. Multiple options can separated using
the & character, although at the moment the only option implemented is
the offset option in the unix_io layer.
/external/e2fsprogs/misc/tune2fs.c
d06863f0e5db501366cf55c85d8e26de1fa4fcc6 12-Apr-2004 Theodore Ts'o <tytso@mit.edu> Remove TUNE2FS_SKIP_MOUNT_CHECK environment variable support; it is
not needed in the initrd script, and wasn't completely supported
anyway.
/external/e2fsprogs/misc/tune2fs.c
2eb3b20e808e360f59d58ced7e833836b652648f 07-Apr-2004 Theodore Ts'o <tytso@mit.edu> tune2fs.c (main): If the environment variable
TUNE2FS_SKIP_MOUNT_CHECK is set, do not try
to check if the filesystem is mounted.
(update_feature_set): If the compatibility bitmasks were
not modified, don't set the superblock dirty bit.
/external/e2fsprogs/misc/tune2fs.c
b969b1b8a5c13992cadb026114731958644540d8 28-Dec-2003 Matthias Andree <matthias.andree@gmx.de> Fix more compiler warnings.
/external/e2fsprogs/misc/tune2fs.c
544349270e4c74a6feb971123884a8cf5052a7ee 07-Dec-2003 Theodore Ts'o <tytso@mit.edu> Fix gcc -Wall nitpicks
/external/e2fsprogs/misc/tune2fs.c
817e49e3ce0a70252113438440fc12607140d032 21-Nov-2003 Theodore Ts'o <tytso@mit.edu> Check the returned name from blkid_get_devname in tune2fs and
e2fsck, and print an error if the requested LABEL/UUID does
not exist (previously, we core dumped!)
/external/e2fsprogs/misc/tune2fs.c
2a29f1354f793557fa1829c9e85e74586e2907db 05-May-2003 Theodore Ts'o <tytso@mit.edu> Add --enable-test-io-debug configure option which causes e2fsck and
tune2fs to use the test I/O manager.

The test I/O manager has been changed to not do anything extra by
default, unless the TEST_IO_FLAGS and/or TEST_IO_BLOCK environment
variables are set, which controls what I/O operations are logged and
a block number to watch, respectively. The log messages are sent to
stderr by default, unless a filename is specified via the
TEST_IO_LOGFILE environment variable.
/external/e2fsprogs/misc/tune2fs.c
bc7c14e0408665addd01b978b1950963b1ed799f 03-May-2003 Theodore Ts'o <tytso@mit.edu> tune2fs.c (parse_time): Add portability code to work around lack
of strptime().
/external/e2fsprogs/misc/tune2fs.c
332f2c23821a17808b2566a7200b286ba9bc855a 06-Mar-2003 Theodore Ts'o <tytso@mit.edu> tune2fs.c (parse_tune2fs_options, parse_e2label_options): Allow
the device name to be specified using LABEL=xxx or
UUID=xxx, since we're including the blkid library anyway.
(Addresses Debian bugs #166048, #179671)
/external/e2fsprogs/misc/tune2fs.c
ed1b33e8fb310641684d68a177c940b58f2f529d 02-Mar-2003 Theodore Ts'o <tytso@mit.edu> Minor bug fixes in the blkid library.

Convert mke2fs, fsck, and tune2fs to use the blkid library.
/external/e2fsprogs/misc/tune2fs.c
a0c3fd5e4cdc2e0b032c9ace89d960a622069c32 15-Oct-2002 Theodore Ts'o <tytso@mit.edu> Add support for new feature in ext2/3 filesystems; a default mount options field
in the superblock. Added the tune2fs '-o' option to set this field.
/external/e2fsprogs/misc/tune2fs.c
3e69906495d5898849a6154b0311b5d4a84a27ae 14-Oct-2002 Theodore Ts'o <tytso@mit.edu> Fix gcc -Wall nits.

Fix format bug if NLS is in use.

Add extra so that the info directory looks OK on OpenWall.
/external/e2fsprogs/misc/tune2fs.c
843049c4dbfe8a0dd4332569eff0ac93529e3324 22-Sep-2002 Theodore Ts'o <tytso@mit.edu> mke2fs.c (main): Enable directory indexing by default.

tune2fs.c (update_feature_set): Allow directory indexing flag to
be set. If so, set the default hash to be TEA, and
initialize the hash seed to a random value.
/external/e2fsprogs/misc/tune2fs.c
118d7dacc535fde4e2ed8d996de3919aa0eb2e98 18-Aug-2002 Theodore Ts'o <tytso@mit.edu> Add support for searching /proc/evms/volumes when interpreting
LABEL=xxx or UUID=xxx.

Add new utility program /sbin/findfs, which interprets LABEL=xxx or
UUID=xxx, and returns the device name. (Part of tune2fs).
/external/e2fsprogs/misc/tune2fs.c
14308a5398984842e808faa3ff2dd6a1c52d90bd 05-Mar-2002 Theodore Ts'o <tytso@mit.edu> Newer libintl needs LC_CTYPE to be set in addition to LC_MESSAGES.
/external/e2fsprogs/misc/tune2fs.c
0072f8de528310d82700b1a6a381895b4ca93c10 26-Feb-2002 Andreas Dilger <adilger@clusterfs.com> Add check for mkfs.ext3 and create a journal in this case.
/external/e2fsprogs/misc/tune2fs.c
c007bc06d97d4b433e4d645edae994a5ae75fa01 26-Dec-2001 Andreas Dilger <adilger@clusterfs.com> Return a non-zero exit code on error.
/external/e2fsprogs/misc/tune2fs.c
d4de4aa938339275515b2b5b6fcf8ca2b51c3d34 26-Dec-2001 Theodore Ts'o <tytso@mit.edu> tune2fs.8.in, tune2fs.c (parse_tune2fs_options, main): Add
support for new option, -T, which allows the user to set
the last checked time on the filesystem.
/external/e2fsprogs/misc/tune2fs.c
4ea7bd04390935e1f8b473c8b857e518df2e226b 17-Dec-2001 Theodore Ts'o <tytso@mit.edu> Fix various gcc -Wall nits. Fixed a bug in mke2fs where a bogus
error message could be printed on an malloc() failure, and e2image
was optimized to avoid needless system calls by using the stashed
inode functions.
/external/e2fsprogs/misc/tune2fs.c
f6a6afcef4ccd0215bd00a21efc20b932abbaf0c 20-Sep-2001 Theodore Ts'o <tytso@mit.edu> Remove dead code that wasn't in use from tune2fs.
/external/e2fsprogs/misc/tune2fs.c
0f8973fb092a40fd0a11b7ec95c09128c9fb8f0c 27-Aug-2001 Theodore Ts'o <tytso@mit.edu> Remove EXT2FS_VERSION from the version display, since it
only confuses people.

Make fsck's version display be consistent with the other e2fsprogs
programs.
/external/e2fsprogs/misc/tune2fs.c
e843c760166498221cabb5b9c44cf7c34bee2515 18-Aug-2001 Theodore Ts'o <tytso@mit.edu> Minor fixups to Andreas' changeset. Removed unused variable
from tune2fs and added missing function prototype.
/external/e2fsprogs/misc/tune2fs.c
2d15576dfe8ffd8521a6f4211cef3d2a663dc379 17-Aug-2001 Andreas Dilger <adilger@clusterfs.com> 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.
/external/e2fsprogs/misc/tune2fs.c
7141b54b1af506a9a5fdf4aed649eb6526bad706 16-Aug-2001 Theodore Ts'o <tytso@mit.edu> * tune2fs.c: Make sure that error messages are sent to stderr, and
normal messages are sent to stdout. (Addresses Debian bug
#108555.)
/external/e2fsprogs/misc/tune2fs.c
d258668d588a1f07e29f12483c5f58eb84d7b5f3 15-Aug-2001 Theodore Ts'o <tytso@mit.edu> Give an error if -O is specified more than once to tune2fs.
/external/e2fsprogs/misc/tune2fs.c
194686bbae9da1259035693d7449d7662720b19b 31-Jul-2001 Theodore Ts'o <tytso@mit.edu> 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
/external/e2fsprogs/misc/tune2fs.c
de49f015a4585900ca40e291f9b9a827714f0d8f 30-Jul-2001 Theodore Ts'o <tytso@mit.edu> tune2fs.c (update_feature_set): Don't require a forced fsck if
we're removing an external journal from a filesystem.
/external/e2fsprogs/misc/tune2fs.c
66cf2f60350ad6ef9ce5b000b5107d4508634887 14-Jun-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, mke2fs.c, tune2fs.8.in, tune2fs.c, util.c, util.h:
tune2fs.c, mke2fs.c, util.c, util.h (print_check_message): Move the
message which displays how often the filesystem will be checked from
mke2fs into a utility subroutine. Then cause tune2fs to call that
function to display the message after adding a journal to a
filesystem.
mke2fs.8.in: Add manual page fixups and explanation for why it's good
to check filesystems periodically from Andreas Dilger.
/external/e2fsprogs/misc/tune2fs.c
e549d0a6a8088ab58e60db4e6f878cf59502af69 25-May-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, tune2fs.c:
tune2fs.c (update_feature_set): Fix capitalization typo.
/external/e2fsprogs/misc/tune2fs.c
54c637d4d29af3e6365779f8b12976abe95a4753 14-May-2001 Theodore Ts'o <tytso@mit.edu> Many files:
badblocks.c, chattr.c, dumpe2fs.c, e2image.c, findsuper.c, lsattr.c,
mke2fs.c, mklost+found.c, tune2fs.c, util.c: Change location of
ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, resize2fs.h:
resize2fs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, debugfs.h:
debugfs.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, e2fsck.h, scantest.c:
e2fsck.h, scantest.c: Change location of ext2_fs.h to be
ext2fs/ext2_fs.h
ChangeLog, Makefile.in, tst_uuid.c, uuid_time.c:
tst_uuid.c, uuid_time.c: Remove unneeded #include of ext2_fs.h
ChangeLog, Makefile.in, e2p.h:
e2p.h: Change location of ext2_fs.h to be ext2fs/ext2_fs.h
ChangeLog, Makefile.in, test_icount.c, test_rel.c:
test_icount.c, test_rel.c: Change location of ext2_fs.h to be
ext2fs/ext2_fs.h
/external/e2fsprogs/misc/tune2fs.c
8d6417498c96c6877ed42da29991c82961e1bf15 14-May-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog:
Clarify some of the Changelog entries.
ChangeLog, fsck.8.in, mke2fs.8.in, tune2fs.8.in:
fsck.8.in, mke2fs.8.in, tune2fs.8.in: Fix typo's and make other
clarifications suggested by Andreas Dilger.
ChangeLog, tune2fs.c:
tune2fs.c (update_feature_set): Clean up some printf messages.
/external/e2fsprogs/misc/tune2fs.c
ce57f14f409a1e51c93c763850560143f7b40b0f 26-Apr-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, tune2fs.c:
tune2fs.c (parse_tune2fs_options): Interpret -c 0 as -c -1 (for
backwards compatibility with older kernels). -c 0 makes more sense to
users.
tune2fs.8.in:
Update tune2fs manual papge so that it is up to date.
/external/e2fsprogs/misc/tune2fs.c
4d0f22832cf02183e001ce9dd94787aaf2ff1ec9 23-Apr-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, tune2fs.c:
tune2fs.c (remove_journal_device): If the force flag is given, tune2fs
will remove the journal device information from the superblock even if
tune2fs failed to open the journal device or otherwise other failed to
remove the filesystem from journal device.
(parse_tune2fs_options): Fix -j option so that it works (it was
missing the open_flag being set to EXT2_FLAG_RW).
(main): Accept "-U clear" to set a null UID.
/external/e2fsprogs/misc/tune2fs.c
1d08d9bfc225543eaf12bee7cf655124f66f43e4 17-Apr-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, mke2fs.c, tune2fs.c:
mke2fs.c, tune2fs.c: Add newlines to error messages so that they look
nicer.
/external/e2fsprogs/misc/tune2fs.c
2537b6d0c1aa9710a05cdfafc281b4884c67bdb2 26-Mar-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c, util.c, util.h:
ke2fs.8.in, tune2fs.8.in: Change man paegs to document that the
journal must be bewteen 1024 and 10,240 file system blocks.
mke2fs.c, tune2fs.c: Change to use figure_journal_size()
util.c, util.h (figure_journal_size): Change journal_default_size into
routine which also converts the requested journal size into filesystem
blocks and does bounds checking to make sure the journal is sized
reasonably. Renamed function to journal_default_size.
parse_journal_opts): Remove bounds check for the journal size, since
this is now done in figure_journal_size, and based on the number of
filesystem blocks, as opposed to using the absolute size of the
journal.
/external/e2fsprogs/misc/tune2fs.c
dc2ec525f5619bf478d2aae1b406fca2ff4b0d21 18-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c:
tune2fs.c, mke2fs.c, tune2fs.8.in, mke2fs.8.in: Change user interface
so that -J is used to specify journal options, and -j is used to
request creation of a journal using default values. (This is a UI
change, but we haven't done a formal release, and it makes things much
more consistent with the rest of the options out there.)
tune2fs.c: Add support for removing a filesystem from an external
journal; we correctly remove the filesystem UUID from the external
journal's filesystem list.
/external/e2fsprogs/misc/tune2fs.c
16ed5b3af43c72f60991222b9d7ab65cf53f203d 16-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, Makefile.in, dumpe2fs.c, jfs_user.h, mke2fs.c, tune2fs.c:
tune2fs.c: Changed the external journal code so that it simply adds a
filesystem to a journal; the journal must have bene created via
"mke2fs -O journal_dev /dev/XXX".
mke2fs.c: Add support for creating an external journal device by using
the command "mke2fs -O journal_dev /dev/XXX". Also changed the
external journal code so -j device=/dev/XXX it simply adds a
filesystem to that journal; the journal must have been created via
separate step.
dumpe2fs.c (print_journal_information): Add support for dumping
information about an external journal device.
/external/e2fsprogs/misc/tune2fs.c
08dd830ddd99b43396bec4401b6badf4498f46d0 14-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, tune2fs.8.in:
tune2fs.8.in: Add description of the -j option.
tune2fs.c:
Minor whitespace and option ordering fixes from Andreas Dilger
/external/e2fsprogs/misc/tune2fs.c
4055ef7301ddf93120eb174f3473be15ce5a658b 14-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, tune2fs.c:
tune2fs.c (add_journal): Minor fixes from Andreas Dilger. Flush stdout
after printing in-progress message.
(main): Exit with status code 1 if we failed to determine the mount
status of the device.
ChangeLog, gcc-wall-cleanup:
gcc-wall-cleanup: Remove additional annoying warning messages emited
by gcc 2.95.2.
ChangeLog, uuid.h:
uuid: Change arguments to make it clear which argument is the source
and which is the destination.
/external/e2fsprogs/misc/tune2fs.c
c8c071a07319939dfd7ae2ff1dedec644d750deb 11-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, e2image.c, mke2fs.c, mklost+found.c, tune2fs.c, util.c, uuidgen.c:
e2image.c, mke2fs.c, mklost+found.c, tune2fs.c, util.c, uuidgen.c: Fix
gcc -Wall complaints, including one bug in tune2fs caused by a block
automatic shadowing version of the variable we really wanted to use,
which broke the logic testing to see if the filesystem was mounted.
ChangeLog, MCONFIG.in:
(gcc-wall-new): Added new target which forgoes the make clean so we
only check the newly modified .c files.
/external/e2fsprogs/misc/tune2fs.c
832381536ee28ea493b73785f7c0cfdd403a8269 09-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, Makefile.in, tune2fs.c:
Makefile.in, tune2fs.c: Move e2label functionality into tune2fs, using
argv[0] as a dispatch. This allows e2label to be (more) safely used
on mounted filesystems.
/external/e2fsprogs/misc/tune2fs.c
63985320384bf143eaac9857af424800d9867a1a 03-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, Makefile.in, mke2fs.c, tune2fs.8.in, tune2fs.c, util.c, util.h:
tune2fs.c (update_feature_set, add_journal): Moved to separate
functions. Added ability to add and remove the journal while the
filesystem is live. Added support for setting a time-based UUID.
Removed zero-initialized static variables.
mke2fs.c, util.c, util.h (strcasecmp, proceed_question,
check_plausibility, parse_journal_opts, check_mount): Moved functions
to util.c so they can be used by tune2fs.
mke2fs.c (main): Change ext2fs_add_journal_fs() to
ext2fs_add_journal_inode() to reflect function renaming.
/external/e2fsprogs/misc/tune2fs.c
b21e38a0df0111f527f7b286ff9119534de04c09 01-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, tune2fs.c:
tune2fs.c (main): Add support to allow HAS_JOURNAL flag to be cleared,
but only if the filesystem is unmounted or mounted read-only. Changed
struct ext2fs_sb to struct ext2_super, and cleaned up old code which
was needed for old versions of ext2_fs.h (not needed since we're using
our own version now).
/external/e2fsprogs/misc/tune2fs.c
45d9e2ff7c4bc08d77b3b671e1da5a94dff2cbee 07-Jul-2000 Theodore Ts'o <tytso@mit.edu> ChangeLog, tune2fs.8.in, tune2fs.c:
tune2fs.8.in: Update manual page to document what happens if
max_mount_count is negative.
tune2fs.c (main): Allow setting the maximal count value to be
negative, since the kernel interprets that as forcing a check.
/external/e2fsprogs/misc/tune2fs.c
373b8337c7b6c6243810be250083fa4773891e92 03-Apr-2000 Theodore Ts'o <tytso@mit.edu> Many files:
badblocks.c, dumpe2fs.c, e2label.c, mke2fs.c, tune2fs.c, uuidgen.c:
For platforms that don't define optarg.h, manually define optarg and
optind.
ChangeLog, main.c:
main.c: For platforms that don't define optarg.h, manually define
optarg and optind.
ChangeLog, unix.c:
unix.c: For platforms that don't define optarg.h, manually define
optarg and optind.
/external/e2fsprogs/misc/tune2fs.c
e1a0a3e304229a625c37f0e845c0c9fff117c8c1 11-Feb-2000 Theodore Ts'o <tytso@mit.edu> Many files:
chattr.1.in:
lsattr.1.in: Change "version" to "version/generation number".
chattr.1.in: Fix stupid file vs filesystem typo.
tune2fs.c Fix spelling error (spare vs sparse).
mke2fs.c (PRS): Add safety check to make sure the number of blocks
doesn't exceed 32 bits on a 64 bit machine.
chattr.c: Random cleanup; file-only variables are now static. Options
for setting/clearings flags put into order, and #ifdef's removed
(since we now use a built-in header file). Add error message if user
tries to set and reset the same flag.
lsattr.c: Random cleanup; file-only variables are now static. The -l
"long" listing has been changed to look nicer. Options names have
been renamed to be more descriptive.
/external/e2fsprogs/misc/tune2fs.c
a4fa100c5b743491f33b77981c4bf28ba4fe1e34 08-Feb-2000 Theodore Ts'o <tytso@mit.edu> .cvsignore, nyc.po:
More i18n checkins.
tune2fs.c:
Fix some stupid i18n compilation bugs.
/external/e2fsprogs/misc/tune2fs.c
d9c56d3ca0bee11e3446ff7e12e3124d28e298a7 08-Feb-2000 Theodore Ts'o <tytso@mit.edu> Many files:
badblocks.c, chattr.c, dumpe2fs.c, e2label.c, findsuper.c, fsck.c,
get_device_by_label.c, lsattr.c, mke2fs.c, mklost+found.c,
nls-enable.h, partinfo.c, tune2fs.c, uuidgen.c: Add
Internationalization support as suggested by Marco d'Itri
<md@linux.it>.
/external/e2fsprogs/misc/tune2fs.c
582134cccf3ddf4f98e3d6038c47d68d43936f3d 19-Jan-2000 Theodore Ts'o <tytso@mit.edu> ChangeLog, tune2fs.c:
tune2fs.c (usage): Update the usage message to correctly document the
-s option.
/external/e2fsprogs/misc/tune2fs.c
18160d26c0fcf8dbe990977c0231ebbc79fc9508 23-Oct-1999 Theodore Ts'o <tytso@mit.edu> mke2fs.c, tune2fs.c:
Fixed usage messages.
/external/e2fsprogs/misc/tune2fs.c
896938d57e7091e7a032674dfeeb91f2a17fd78b 23-Oct-1999 Theodore Ts'o <tytso@mit.edu> ChangeLog, Makefile.in, mke2fs.8.in, mke2fs.c, tune2fs.8.in, tune2fs.c:
tune2fs.c (main): Add a new option -O which allows the user to set and
clear certain "safe" filsystem feature flags. Currently, the only
ones which are supported for modification are sparse_superblock and
filetype.
mke2fs.c (PRS): Add new option -O which allows the user to request
filesystems with specific filesystem options. By default on 2.2 and
later systems, create filesystems that have both file type information
and sparse superblocks.
/external/e2fsprogs/misc/tune2fs.c
671cbfa9fab194888151df2714359e357e047ca2 20-Oct-1999 Theodore Ts'o <tytso@mit.edu> ChangeLog, tune2fs.c:
tune2fs.c: Fix typo (double spaces) in messages regarding changing the
sparse superblock option
/external/e2fsprogs/misc/tune2fs.c
818180cdfcff84b9048ecdc5dc86323f0fefba24 27-Jun-1998 Theodore Ts'o <tytso@mit.edu> ChangeLog, debugfs.8.in, debugfs.c:
Add a -V option which displays the current version.
ChangeLog, unix.c:
unix.c (e2fsck_update_progress): Remove unused variables.
ChangeLog, inode.c:
inode.c (get_next_blockgroup): Fix bug where if get_next_blockgroup()
is called early because of a missing inode table in a block group, the
current_inode counter wasn't incremented correctly.
ChangeLog, tst_uuid.c:
tst_uuid.c (main): Fixed bogus declaration of the main's argv parameter.
ChangeLog, test_icount.c:
test_icount.c (main): Fix main() declaration so that it returns int,
not void.
Many files:
fsck.c (ignore): Remove unused variable cp.
chattr.c (fatal_error):
tune2fs.c (usage):
lsattr.c (usage):
dumpe2fs.c (usage):
badblocks.c (usage): Remove volatile from declaration.
fsck.c: Change use of strdup to be string_copy, since we don't trust
what glibc is doing with strdup. (Whatever it is, it isn't pretty.)
/external/e2fsprogs/misc/tune2fs.c
a789d8406070224503c9ab78040acc7ea80c65ae 30-Mar-1998 Theodore Ts'o <tytso@mit.edu> Many files:
e2label.c: Fix -Wall warning by making functions static.
chattr.1.in: Document that the append-only attribute may only be set
or cleared by the superuser.
Update all manual pages to that the availability section is
up-to-date.
e2label.8.in, tune2fs.8.in: Update manual page to state that labels
must be no longer than 16 characters, or they will be truncated.
e2label.c (change_label), tune2fs.c (main): If the label is longer
than 16 characters, print a warning message stating that the label
will be truncated.
mke2fs.c (PRS): If the user specifies a filesystem size, and it's
larger than the apparent size of the device, print a warning message
and ask if the user wants to proceed.
/external/e2fsprogs/misc/tune2fs.c
519149fb458b0fa69c10fecd83fae42e838cf01d 25-Oct-1997 Theodore Ts'o <tytso@mit.edu> Many files:
fsck.c:
chattr.c: Remove #include of getopt.h, since it's not needed.
tune2fs.c (main):
lsattr.c (main):
badblocks.c (main):
dumpe2fs.c (main):
mke2fs.c (PRS): Make the variable which getopt returns into be
an int, so that it won't lose on platforms where char is
unsigned.
ChangeLog, unix.c:
Make the variable which getopt returns into be an int, so that it
won't lose on platforms where char is unsigned.
/external/e2fsprogs/misc/tune2fs.c
00e5433eb5e9f70f485968b809fdcf297d7fe7b9 16-Sep-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Declare main() to return an int, as required. Make sure main() always
ends with an exit(0). (Some programs weren't doing this, and thus
were returning a random exit value.)
/external/e2fsprogs/misc/tune2fs.c
521e36857227b21e7ab47b0a97f788d2af9f9717 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 1.08.
/external/e2fsprogs/misc/tune2fs.c
19c78dc07fce2d6f39b5e541562afc3ca1ea38ff 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs-1.07
/external/e2fsprogs/misc/tune2fs.c
1e3472c5f37ca3686dd69b079d4d02a302f5798d 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 1.05
/external/e2fsprogs/misc/tune2fs.c
a418d3ad819323f871005d253f7f9ac378e78ba5 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 0.5c
/external/e2fsprogs/misc/tune2fs.c
f3db3566b5e1342e49dffc5ec3f418a838584194 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 0.5b
/external/e2fsprogs/misc/tune2fs.c
3839e65723771b85975f4263102dd3ceec4523c0 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 0.5b
/external/e2fsprogs/misc/tune2fs.c