History log of /external/e2fsprogs/misc/util.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/util.h
ce2e295d7bccb30dfce212d7d694df41c8980e2e 25-Aug-2014 Theodore Ts'o <tytso@mit.edu> mke2fs: improve the error message when a non-existent file is specified

If the user does not specify the file system size, and the file does
not exist, give an error message like this:

The file /tmp/foo.img does not exist and no size was specified.

instead of this:

Creating regular file /tmp/foo.img
mke2fs: Device size reported to be zero. Invalid partition specified, or
partition table wasn't reread after running fdisk, due to
a modified partition being busy and in use. You may need to reboot
to re-read your partition table.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/misc/util.h
a11ccebd899a40986948afd81f218271605b650f 05-May-2014 Theodore Ts'o <tytso@mit.edu> mke2fs: print a message when creating a regular file

We've added the ability to automatically recreate a file if it doesn't
exist prior to creating the file system, since this is often used (for
example) when managing file system images for use in virtual machines.
We should at least notify the user that this is going on to avoid
surprises in the case of misspelled device/file names.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/util.h
dbcd617882ee5c9da80d9257475f2594352f6698 27-Apr-2014 Theodore Ts'o <tytso@mit.edu> mke2fs: check for pre-existing file system

Warn the system administrator if there is an existing file system on
the block device, and give the administrator an opportunity to abort
the mkfs operation.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/util.h
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/util.h
802146c017afc6df706111c3b70ff6c3d4850b18 26-Apr-2014 Theodore Ts'o <tytso@mit.edu> mke2fs: create a regular file if necessary

This is useful when creating a filesystem for use with a VM, for
example.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/util.h
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/util.h
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/util.h
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/util.h
14b283ae565930144ef5ace12483d602cc3e7539 29-Sep-2011 Theodore Ts'o <tytso@mit.edu> mke2fs: set s_max_mnt_count to -1 by default

If the enable_periodic_fsck option is false in /etc/mke2fs.conf (which
is also the default), s_max_mnt_count needs to be set to -1, instead
of 0. Kernels newer than 3.0 will interpret 0 to disable periodic
checks, but older kernels will print a warning message on each mount,
which will annoy users.

Addresses-Debian-Bug: #632637

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/util.h
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/util.h
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/util.h
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/util.h
d4e0b1c6f5aa8c6a248d9149ed5634a310952411 04-Aug-2007 Theodore Ts'o <tytso@mit.edu> Fix gcc -Wall warnings

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/misc/util.h
0072f8de528310d82700b1a6a381895b4ca93c10 26-Feb-2002 Andreas Dilger <adilger@clusterfs.com> Add check for mkfs.ext3 and create a journal in this case.
/external/e2fsprogs/misc/util.h
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/util.h
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/util.h
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/util.h
5683e6e2c78ef4c620f3830c4e2fa4c2ead0eb4c 18-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, util.c, util.h:
util.h, util.c (journal_default_size): New function from Andreas
Dilger to calculate an appropriate default journal size given a
filesystem size.
util.c (parse_journal_opts): Allow the creation of a journal as small
as 1MB.
/external/e2fsprogs/misc/util.h
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/util.h