Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
The EOPNOTSUPP case is unreachable, being outside a set of:
#if
...
return;
#else
...
return;
#endif
Fix this up so that if neither HAVE_CHFLAGS nor
HAVE_EXT2_IOCTLS applies, we set EOPNOTSUPP.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Using the /* fallthrough */ comment lets Coverity (and humans)
know that we really do want to fall through in these case statements.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
The set_fields commands (set_super_value, set_inode_field,
set_block_group) now handle fields which store in split fields on
ext4's on-disk format. For example, the superblock fields
s_blocks_count and s_blocks_count_hi.
The user can either set the low or high part of the field via
"blocks_count_lo" or "blocks_count_hi", or both parts can be set via
"blocks_count".
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Reserve EXT4_FEATURE_RO_COMPAT_METADATA_CSUM and
EXT2_FEATURE_COMPAT_EXCLUDE_BITMAP. Also reserve fields in the
superblock and the inode for the checksums. In the block group
descriptor, reserve the exclude bitmap field for the snapshot feature,
and checksums for the inode and block allocation bitmaps.
With this commit, the metadata checksum and exclude bitmap features
should have reserved all of the fields they need in ext4's on-disk
format.
This commit also fixes an a missing byte swap for s_overhead_blocks.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Cc: Amir Goldstein <amir73il@gmail.com>
|
|
|
|
Thanks to Israel G. Lugo for pointing this out.
Addresses-Debian-Bug: #641667
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
The BLKFLSBUF and FDFLUSH ioctls are Linux specific, and do not
really have anything to do with __GNUC__ (which is also used on
OS/X and Solaris). Only print these warnings on Linux systems.
statfs64() is deprecated on OSX and generates a deliberate warning.
Fix some other warnings that show up on OSX builds.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
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>
|
|
Conflicts:
lib/e2p/ls.c
|
|
It turns out that it's very hard to calculate overheads in the face of
clustered allocation (bigalloc). This is because multiple metadata
blocks from different block groups can end up in the same allocation
cluster. Calculating the exact overhead requires O(all block bitmaps)
in memory, or O(number of block groups**2) in time. So we will
calculate this at mkfs time and stash it in the superblock.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Conflicts:
lib/ext2fs/initialize.c
|
|
This adds the superblock fields needed so that dumpe2fs works and the
code points and renames the superblock fields from describing
fragments to clusters.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
This patch adds support for detecting the new 'quota' feature in ext4.
The patch reserves code points for usr and group quota inodes and also
for the feature flag EXT4_FEATURE_RO_COMPAT_QUOTA.
Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Conflicts:
configure
configure.in
lib/ext2fs/ext2fs.h
misc/mke2fs.c
|
|
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>
|
|
Conflicts:
resize/extent.c
|
|
Add superblock fields which track where and when the first and most
recent file system errors occured. These fields are displayed by
dumpe2fs and cleared by e2fsck.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
We also support for byte-swapping the Next3 fields, although the
current Next3 implementation doesn't support big-endian systems.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Conflicts:
e2fsck/journal.c
e2fsck/pass1.c
e2fsck/pass2.c
misc/mke2fs.c
|
|
The top-level COPYING file states that the e2p and ext2fs libraries
are available under the LGPLv2. The files were incorrectly labelled.
Alex Thomas/Luster has been consulted wrt to the ext3_extents.h file;
the rest of the files were primarily authored by Theodore Ts'o.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Some people don't want to see the concise "kernel-style" make output.
This configure option allows build engines that want to see the full
set of commands executed by the makefile to get what they want. Most
people will find this more distracting than useful, unless they need
to debug the Makefiles.
(It is not necessary to rerun configure to enable this verbose make
output temprarily; if a developer wants to do a quick debug of a
directory's makefile, he or she can simply edit the definition of the
$(E) and $(Q) variables in the Makefile; instructions can be found in
the MCONFIG file which is included in at the beginning of every
Makefile.)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Tidy up the chattr(1) manpage to completely document all
available options, and differentiate those which are read-only
early in the manpage as well.
* Remove "I" from settable attribute list
* add "e" to 2nd list of settable attributes & descriptions
* Note that h/E/I/X/Z are readonly
* Correct "H" to "h" for huge file attribute description
* fix long_name for indexed directory in flags_array
Addresses-Red-Hat-Bugzilla: BZ#502971
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Define the prototypes for e2p_jrnl_feature2string() and
e2p_jrnl_string2feature() in e2p.h. This promotes better error
checking and avoids warnings when compiling the library and programs
that call these functions.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
This field tracks the lifetime amount of writes to the filesystem. It
will be updated by the kernel as well as by e2fsprogs programs which
write to the filesystem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Addresses-Sourceforge-Bug: #2089537
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
iterate_on_dir() can try to copy too much data from the directory
entry, resulting in a crash.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Make os_tab static, since there's no reason it should be exposed.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Print out the currently supported features of e2fsprogs/libext2fs
via a new "debugfs supported_features" command. This helps scripts
to know whether it is possible to try and enable specific features
in the filesystem.
Signed-off-by: Kalpak Shah <kalpak.shah@sun.com>
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Add superblock definition, and dumpe2fs and debugfs support.
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Make dumpe2fs and debugfs print out the s_min_extra_isize and
s_wanted_extra_isize fields from the superblock.
Update tests expect files as appropriate.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
This was the original name used by Lustre's patches; keep the plural
when converting feature names to a feature mask for compatibility's
sake.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Allow the old name of uninit_groups when converting feature names for
backwards compatibility for scripts running mke2fs and tune2fs.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
This name is a more intuitive option when running mke2fs.
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>
|
|
Conflicts:
lib/blkid/devname.c
lib/blkid/probe.c
misc/mke2fs.c
misc/tune2fs.c
|
|
This creates a new enhanced edit_feature function for libe2p which
supports a different set of feature flags that are OK to clear as
opposed to set, and which returns more specific information about why
the user provided an invalid edit feature command.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Update m_raid_opt test so that it reflects the code change.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Conflicts:
configure
lib/ext2fs/ext2_fs.h
misc/e2image.c
|
|
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>
|
|
Merge commit 'c2d4300b8a4a13d8a78b86c386f76259f23feec2' into next
|
|
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(-)
|