Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
In many places we are using #ifdef HAVE_OPEN64 to determine if we can
use open64() but that's ugly. This commit creates two new helpers
ext2fs_open_file() for open() and ext2fs_stat() for stat(). Also we need
new typedef ext2fs_struct_stat for struct stat.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
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>
|
|
Conflicts:
e2fsck/journal.c
e2fsck/pass1.c
e2fsck/pass2.c
misc/mke2fs.c
|
|
This for RH bug #572935 -
RFE: Misleading error message from mke2fs -J option
If the journal device UUID is typo'd or otherwise not found,
the error message looks like it's a usage() type of problem.
It'd be helpful to explicitly say that the device requested
could not be found.
Addresses-Red-Hat-Bug: #572935
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
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>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Addresses-Debian-Bug: #491620
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
When fgets() function fails, contents of the buffer is undefined. That
is, fgets() return value needs to be checked, to avoid undefined behavior.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Factor out the code which sets the default journal size and move it
into libext2fs.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Increase the maximum size of the journal to 100 times the previous
maximum, but add a restriction that it can be no more than half the size
of the filesystem.
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Coverity ID: 33: Resource Leak
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Make the smallest journal be 1400 blocks instead of 1024 blocks to
make sure there is enough room to support on-line resizing.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Disambiguate the use of "-F" (force) flag for mke2fs to avoid dangerous
situations. The use of -F is needed for regular backing files and
for filesystems on whole block devices. It should NOT be confused
with mke2fs on an apparently-mounted or in-use filesystem.
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
the filesystem appears to be busy; if so, the programs will print an
error message and abort. (Addresses Debian Bug #308594).
|
|
given modern memory sizes. Now, for filesystems greater than 4GB, we
use a journal of 128 MB instead 32 MB.
|
|
|
|
Tested on FreeBSD 5.2-CURRENT as of 2003-12-28.
Tested on FreeBSD 4.9-STABLE as of 2003-12-27.
|
|
|
|
instead of having the build to crash. (Addresses Debian
bug #221778)
|
|
Remove "NYC" translation. Add Czech translation from Miloslav
Trmac <mitr@volny.cz>
Random NLS and other display fixes from Miloslav.
|
|
Convert mke2fs, fsck, and tune2fs to use the blkid library.
|
|
|
|
error message could be printed on an malloc() failure, and e2image
was optimized to avoid needless system calls by using the stashed
inode functions.
|
|
check_plausibility() works with files > 2GB.
|
|
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.
|
|
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.
|
|
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
|
|
util.c: Use specific check for HAVE_SYS_STAT_H.
|
|
mke2fs.c (create_journal_dev): Call ext2fs_create_journal_superblock()
first, so if it's going to error out, the user finds out before
waiting for the entire device to get zero'ed.
ChangeLog, util.c:
util.c (parse_journal_opts): Remove code which allowed a bare number
to be treated as a journal size.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|