aboutsummaryrefslogtreecommitdiffstats
path: root/lib/e2p/feature.c
Commit message (Collapse)AuthorAgeFilesLines
* Add bare-bones encryption support to e2fsckTheodore Ts'o2015-07-181-0/+2
| | | | | | Bug: 22483407 Change-Id: I4e9c4e4c855454c7458c85afba47b01eb0111b20 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Switch back to 1.42.9 now that there is a fixJP Abgrall2014-03-191-1/+24
| | | | | | Revert "Revert changes that moved from 1.41.14 to 1.42.9" This reverts commit 65f0aab98b20b5994a726ab90d355248bcddfffd.
* Revert changes that moved from 1.41.14 to 1.42.9JP Abgrall2014-03-061-24/+1
| | | | | | | | | | | | | | | | Revert "e2fsck: Don't use e2fsck_global_ctx unless HAVE_SIGNAL_H" commit e80e74c41d85ff93f3d212ba6512340f48054a93. Revert "Merge remote-tracking branch 'linaro/linaro-1.42.9' into aosp_master" This reverts commit e97b2b6fc82f840e84dfc631b87f21be44ff2421, reversing changes made to 7e2fb9d09c245eba70ee008b78007315e9c0f1df. Revert "Prepare for upstream 1.42.9" This reverts commit 7e2fb9d09c245eba70ee008b78007315e9c0f1df. Bug: 13340735 Change-Id: If48b153a95ef5f69f7cdccb00e23524abff3c5a8 Signed-off-by: JP Abgrall <jpa@google.com>
* Add files that would normally be generated by the e2fsprogs build systemBernhard Rosenkränzer2014-01-051-1/+0
| | | | | | | | | | | | | | | | | Android doesn't run ./configure and friends, so it has to rely on pre-populated versions of the autogenerated files. This is somewhat bogus (e.g. hardcoded little-endian reference in lib/ext2fs/ext2_types.h) and should at some point be fixed, but it's what Android has always done, not a regression from the 1.41.14 branch. Also, don't #include config.h which we don't generate (we pass what it usually contains as -D parameters from Android.mk) anywhere. Add a new Android.mk file for the quota library. Change-Id: I162c6327fee5bd06261d9cdcc34bda10f04a6f21 Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
* libe2p: teach e2p_jrnl_feature2string() about the 64-bit journal featureTheodore Ts'o2012-05-211-0/+2
| | | | | | | This will allow dumpe2fs to correctly display the 64-bit journal feature, if it is enabled. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Reserve the codepoints for the INCOMPAT features LARGEDATA and INLINEDATATheodore Ts'o2012-05-111-0/+8
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libext2fs, libe2p: Reserve RO_COMPAT_REPLICA featureTheodore Ts'o2012-02-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The replica is a feature which stores multiple copies of the key metadata blocks so a single block failure in failure-prone media (read: certain types of flash storage) doesn't take out the entire file system. Discussion on the upstream list proved not to be very positive on this feature; the arguments were that it added complexity that wasn't warrented, since common practice in industry is to insist on reliable media, and if media is unreliable, you're kind of toast anyway (unless the file system is being used as the back-end store of a cluster file system where checksuming and data replication is happening above the local disk file system level). So, this feature is being developed out of tree. We reserve the code points so that other people won't accidentally step on them. Since it's not upstream, it's a soft reservation, but it's not like we have any shortage of RO_COMPAT features. We are a bit more tight on reserved inodes, but EXT2_BOOT_LOADER_INO and EXT2_UNDEL_DIR_INO are not currently used anywhere, and EXT2_EXCLUDE_INO is a reservation for another out-of-tree feature. There are no features currently being discussed which require a reserved inode, but if a need were to arise, we can claw back code point reservations that were never used or not in tree, as those will always be considered lower priority than in-tree features. Cc: Aditya Kali <adityakali@google.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* ext2fs: add multi-mount protection (INCOMPAT_MMP)Andreas Dilger2011-09-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Shorten compile commands run by the build systemTheodore Ts'o2011-09-181-0/+1
| | | | | | | | | | | | | | | 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>
* e2fsprogs: annotate intentional fallthroughs in case statementsEric Sandeen2011-09-161-0/+1
| | | | | | | | 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>
* debugfs: add 64-bit support to the set_field commandsTheodore Ts'o2011-09-161-1/+1
| | | | | | | | | | | | | 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>
* libext2fs: add metadata checksum and snapshot feature flagsTheodore Ts'o2011-09-161-0/+4
| | | | | | | | | | | | | | | | | | 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>
* Add basic BIGALLOC support for cluster-based allocationTheodore Ts'o2011-02-251-0/+2
| | | | | | | | 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>
* e2fsprogs: reserving code points for new ext4 quota featureAditya Kali2011-02-251-0/+2
| | | | | | | | | 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>
* libe2p, libext2fs: Update file copyright permission states to match COPYINGTheodore Ts'o2010-05-171-3/+4
| | | | | | | | | 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>
* Remove trailing whitespace for the entire source treeTheodore Ts'o2008-08-271-8/+8
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* add debugfs command to print known featuresAndreas Dilger2008-08-241-0/+130
| | | | | | | | | | | 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>
* Change the primary name of the extents feature to be 'extent'Theodore Ts'o2008-04-171-2/+2
| | | | | | | | 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>
* Rename the feature uninit_groups to uninit_bgTheodore Ts'o2008-04-171-0/+2
| | | | | | | 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>
* Rename feature name from gdt_checksum to uninit_groupsJose R. Santos2008-03-201-1/+1
| | | | | | | | 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>
* Merge branch 'maint'Theodore Ts'o2008-02-271-8/+39
|\ | | | | | | | | | | | | | | | | Conflicts: lib/blkid/devname.c lib/blkid/probe.c misc/mke2fs.c misc/tune2fs.c
| * libe2p: New e2p_edit_feature2 which provides better error handlingTheodore Ts'o2008-02-261-8/+39
| | | | | | | | | | | | | | | | | | 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>
* | Enable FLEX_BG feature supportJose R. Santos2007-11-031-0/+2
|/ | | | | | | | | | | | | | | | | | 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(-)
* [COVERITY] Fix memory leak in libe2p (e2p_edit_feature)Brian Behlendorf2007-03-211-8/+13
| | | | | | | Coverity ID: 15: Resource Leak Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Add support for printing new filesystem featuresTheodore Ts'o2006-11-121-0/+14
| | | | | | | Add support for printing the huge_file, gdt_checksum, dir_nlink, extra_isize, extent, and 64bit features. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Add support for EXT2_FEATURE_COMPAT_LAZY_BGTheodore Ts'o2006-05-081-0/+2
| | | | | | | | | | | | | | This feature is initially intended for testing purposes; it allows an ext2/ext3 developer to create very large filesystems using sparse files where most of the block groups are not initialized and so do not require much disk space. Eventually it could be used as a way of speeding up mke2fs and e2fsck for large filesystem, but that would be best done by adding an RO_COMPAT extension to the filesystem to allow the inode table to be lazily initialized on a per-block basis, instead of being entirely initialized or entirely unused on a per-blockgroup basis. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Change mke2fs to use /etc/mke2fs.conf as a configuration fileTheodore Ts'o2006-03-231-3/+11
| | | | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Add definition for the extents filesystem feature and inode flag.Theodore Ts'o2004-11-291-0/+2
| | | | | | | | Change the maximum allowable blocksize to be 65536. This allows e2fsck to check filesystems with a pagesize of 65536, and mke2fs to accept -b 65536. Of course such a filesystem will not currently work on a Linux/x86 system, at least not as of this writing!
* Remove EXT2_FEATURE_RO_COMPAT_BTREE_DIR mention of since it's notTheodore Ts'o2003-04-111-2/+0
| | | | | | actually used, and may confuse people who are looking for EXT2_FEATURE_COMPAT_DIR_INDEX, which is in use.
* Add support for the meta_blockgroup filesystem format.Theodore Ts'o2002-10-201-0/+2
|
* Add initial support for extended attribute blocksTheodore Ts'o2001-07-021-0/+2
|
* ChangeLog, feature.c:Theodore Ts'o2001-05-131-0/+4
| | | | | feature.c: Add COMPAT_DIR_INDEX and RESIZE_INODE known features
* ChangeLog, feature.c:Theodore Ts'o2001-01-141-0/+2
| | | | | feature.c: Add definition for EXT3_FEATURE_INCOMPAT_JOURNAL_DEV
* ChangeLog, feature.c:Theodore Ts'o2001-01-141-41/+0
| | | | | | | | | feature.c: Remove backward compatibility #ifdef's for old ext2_fs.h header files. .del-ext2_fs.h~7a460879, ChangeLog: ext2_fs.h (EXT3_FEATURE_INCOMPAT_JOURNAL_DEV): Add definition for use with external journal devices.
* ChangeLog, Makefile.in, jump.funcs, jump.import, jump.params:Theodore Ts'o2000-04-061-1/+1
| | | | | | | | | | | | | | | Makefile.in (uuid_time): Compile uuid_time in two steps (first create .o, then link it against the libraries) to work around bug in a.out linker. dll/jump.funcs, dll/jump.import, dll/jump.params: Update a.out shared library control files to reflect new added files. ChangeLog, feature.c, jump.funcs: feature.c: Make feature_list static; it shouldn't be exported. dll/jump.funcs: Update a.out shared library control file. ChangeLog, badblocks.c: badblocks.c (flush_bufs): Use fsync() if the system doesn't support fdatasync().
* ChangeLog, e2p.h, feature.c:Theodore Ts'o1999-10-261-14/+16
| | | | | | | | | | | | | feature.c: Fix GCC warnings; add const to the char * types in the function prototypes for e2p_feature2string and e2p_edit_feature. ChangeLog, uuid.h, uuid_time.c: uuid_time.c (variant_string): Declare to be static to avoid gcc warnings. uuid.h: Add function prototypes for uuid_generate_random() and uuid_generate_time(). ChangeLog, chattr.c: chattr.c: Add hack to compile in a definition for S_ISLNK so we can successfully compile even with warnings turned on.
* ChangeLog, e2p.h, feature.c:Theodore Ts'o1999-10-231-5/+10
| | | | | | | | feature.c (e2p_edit_feature), e2p.h: Add a new argument which allows the calling application to limit what features the user is allowed to set or clear using this function. Also add support for comma separated lists.
* ChangeLog, Makefile.in, e2p.h, feature.c, ls.c:Theodore Ts'o1999-09-141-0/+214
Makefile.in, feature.c, e2p.h: New file which is used for displaying and editing superblock feature sets. ls.c (print_features, list_super): Add new function print_features which is used to display the feature bits in the superblock.