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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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(-)
To allow error messages to be reflected up, if the callback function
returns a non-zero value, bump a counter and return the number of
times the callback function signals an error by returning a non-zero
status code.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This was actually a bug in libe2p's parse_num_blocks() function. When
handling the 's' suffix, it was ignoring the blocksize information
passed in from the caller and always interpreting the number in terms of
a 1k blocksize.
Addresses Debian Bug: #408298
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>