summaryrefslogtreecommitdiff
path: root/lib/ext2fs/ext2_fs.h
AgeCommit message (Collapse)AuthorFilesLines
2007-05-18Store the RAID stride value in the superblock and take advantage of itTheodore Ts'o1-1/+3
Store the RAID stride value when a filesystem is created with a requested RAID stride, and then use it automatically in resize2fs. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-05-08Fix mke2fs and debugfs to support large (> 16 bit) uid's and gid'sEric Sandeen1-1/+6
Mke2fs is supposed to set the uid/gid ownership of the root directory when a non-rooot user creates the filesystem. This wasn't working correctly if the uid/gid was > 16 bits. In additional, debugfs wasn't displaying large uid/gid's correctly. This patch fixes these two programs. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-19Define the l_i_iversion field in ext2_inodeTheodore Ts'o1-2/+2
The l_i_version field is now defined from the old l_i_reserved1 field in the ext2 inode. This field will be used to store high 32 bits of the 64-bit inode version number. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-30Fix (as yet unused) struct ext4_group_desc to add a missing bg_pad fieldTheodore Ts'o1-0/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-11Add directory hashed signed/unsigned hint to superblockTheodore Ts'o1-4/+14
The e2fsprogs and kernel implementation of directory hash tree has a bug which causes the implementation to be dependent on whether characters are signed or unsigned. Platforms such as the PowerPC, Arm, and S/390 have signed characters by default, which means that hash directories on those systems are incompatible with hash directories on other systems, such as the x86. To fix this we add a new flags field to the superblock, and define two new bits in that field to indicate whether or not the directory should be signed or unsigned. If the bits are not set, e2fsck and fixed kernels will set them to the signed/unsigned value of the currently running platform, and then respect those bits when calculating the directory hash. This allows compatibility with current filesystems, as well as allowing cross-architectural compatibility. Addresses Debian Bug: #389772 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-11On-disk format for controlling the inode sizeTheodore Ts'o1-3/+11
- EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE (0x0040?) - add s_min_extra_isize and s_want_extra_isize fields to superblock, which allow specifying the minimum and desired i_extra_isize fields in large inodes (for nsec+epoch timestamps, potential other uses). Needs RO_COMPAT flag handling, needs e2fsck support, patch complete, little testing. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-11On-disk format definition for 64-bit supportTheodore Ts'o1-4/+29
- EXT4_FEATURE_INCOMPAT_64BIT (0x0080) - support for 64-bit block count fields in the superblock (s_blocks_count_hi, s_free_blocks_count_hi), large group descriptors (s_desc_size), extents with high 16 bits (ee_start_hi, ei_leaf_hi), inode ACL (i_file_acl_hi). May also grow to encompass the previously proposed BIG_BG. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-11On-disk format for large number of subdirectoriesTheodore Ts'o1-1/+2
- EXT4_FEATURE_RO_COMPAT_DIR_NLINK (0x0020?) - allow directories to have > 65000 subdirectories (i_nlinks) by setting i_nlinks = 1 for such directories. RO_COMPAT protects old filesystems from unlinking such directories incorrectly and losing all files therein. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-11On-disk format definition for group descriptor checksumsTheodore Ts'o1-1/+4
- EXT4_FEATURE_RO_COMPAT_GDT_CSUM (0x0010?) - store a crc16 checksum in the group descriptor (s_uuid[16] | __u32 group | ext3_group_desc (excluding gd_checksum itself)). This allows the kernel to more safely manage UNINIT groups. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-11On-disk format definition for huge filesTheodore Ts'o1-4/+3
- EXT4_FEATURE_RO_COMPAT_HUGE_FILE (0x0008) - change i_blocks to be in units of s_blocksize units instead of 512-byte sectors, use l_i_frag and l_i_fsize as i_blocks_hi (could also be part of 64BIT). E2fsck and debugfs changed to support i_blocks_hi instead of l_i_frag and l_i_fsize. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-08-05Rename EXT3_EXTENTS_FL to EXT4_EXTENTS_FL and make it visible to the userAndreas Dilger1-2/+2
lsattr will display the EXT4_EXTENTS_FL flag Signed-off-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-08Add support for EXT2_FEATURE_COMPAT_LAZY_BGTheodore Ts'o1-1/+5
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>
2006-03-17Add support for on-line resizing to resize2fsTheodore Ts'o1-0/+16
If the filesystem is mounted, attempt to use the on-line resizing ioctls to resize the filesystem. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-01-25Add library support for large (EA in inode) inodes. Make sure that garbageTheodore Ts'o1-0/+59
doesn't get written into the reserved portion when writing into filesystems that have large inodes defined.
2004-11-29Add definition for the extents filesystem feature and inode flag.Theodore Ts'o1-1/+4
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!
2004-01-30Fix a byte swap bugs, including one which caused e2fsck to Theodore Ts'o1-2/+2
incorrectly treat as valid symlinks created with SE Linux (Debian bug #228723) as well as failing the f_journal test case on big endian systems due to the backup journal blocks not being swapped.
2003-08-21Add support for backing up the journal inode location in the Theodore Ts'o1-2/+8
superblock. E2fsck will automatically save the journal information in the superblock if it is not there already, and will use it if the journal inode appears to be corrupted. ext2fs_add_journal_inode() will also save the backup information, so that new filesystems created by mke2fs and filesystems that have journals added via tune2fs will also have journal location written to the superblock as well. Debugfs's logdump command has been enhanced so that it can use the journal information in the superblock. The debugfs man page has been improved to more fully describe the logdump command. Added two new functions, ext2fs_file_open2() and ext2fs_inode_io_intern2() which take a pointer to an inode structure; this is needed so that e2fsck and debugfs can synthesize a fake journal inode and use it to access the journal.
2003-07-06Fixx gcc -Wall nitpicks.Theodore Ts'o1-2/+6
2003-04-11Remove EXT2_FEATURE_RO_COMPAT_BTREE_DIR mention of since it's notTheodore Ts'o1-1/+1
actually used, and may confuse people who are looking for EXT2_FEATURE_COMPAT_DIR_INDEX, which is in use.
2002-11-01Add support for a new inode flag, which is to be usedTheodore Ts'o1-1/+2
for indicating the top of directory hierarchies for the Orlov block allocator.
2002-10-25Add a new superblock field, s_mkfs_time, which indicates whenTheodore Ts'o1-1/+2
the filesystem was created. It is set via mke2fs, and printed via list_super2() (which is called by dumpe2fs). Also, list_super2() will now print "n/a" if the last mount time (s_mtime) is zero.
2002-10-20Add support for new default mount options for the journal data mode.Theodore Ts'o1-0/+4
2002-10-20Add support for the meta_blockgroup filesystem format.Theodore Ts'o1-2/+4
2002-10-15Add support for new feature in ext2/3 filesystems; a default mount options fieldTheodore Ts'o1-1/+11
in the superblock. Added the tune2fs '-o' option to set this field.
2002-08-17Modify the half MD4 hash so it is no longer endian dependent. This isTheodore Ts'o1-2/+1
a backwards incompatible change, but this should be OK since the kernel MD4 ext3 code was only in the CVS tree, and hasn't generally escaped. Add support for the TEA hash.
2002-07-20Add support to e2fsck to reindex directories to use hash trees.Theodore Ts'o1-2/+5
2002-07-09ext2_fs.h: Add superblock field for reserved group descriptors.Theodore Ts'o1-1/+1
2002-06-26Add support for the half-MD4 HTREE hash.Theodore Ts'o1-2/+9
Add HTREE root node tests.
2002-06-15Applied Andrew Morton's patch to support the dirsync option.Theodore Ts'o1-1/+2
2002-06-10Do sanity checking of the number of blocks and inodes in a group forAndreas Dilger1-7/+9
8192-byte and 16384-byte blocksize filesystems. Change the default bytes-per-inode ratio of a new filesystem to be at most one inode per block for large blocksizes.
2002-06-09ext2_fs.h: Further minor cleanups of the header. ConsolidateAndreas Dilger1-21/+12
some checks for __KERNEL__ into one place.
2002-05-23ext2_fs.h: Remove macros accessing u.ext2_sb field and useAndreas Dilger1-164/+58
the EXT2_SB() macro instead. Remove kernel function prototypes also. This matches the 2.5 kernel, and is also cleaner for other reasons. Whitespace cleanup.
2002-05-16Add support for creating and checking 8192-byte blocksize filesystems.Andreas Dilger1-6/+7
We complain if you try to create such a filesystem on a system with 4096 byte PAGE_SIZE. Add checks for valid inode size for undocumented -I option.
2002-02-25Add initial support in debugfs for examining directory indexingTheodore Ts'o1-0/+31
information.
2001-11-05Define a new ext2 file attribute, EXT2_NOTAIL_FL,Theodore Ts'o1-2/+3
which signals that a particular inode should not have the last bits of data (the "tail") be merged with another file. This is necessary to keep programs like LILO happy.
2001-08-04Cleanup changes to Andreas' symlink patch. Remove use of EXT2_LINK_DIRTheodore Ts'o1-2/+0
Also cleaned up the symlink handling code to make it a bit more compact and to test for a bad symlink block earlier.
2001-08-04Add extra checks for bad symlinks, including zero length symlinks,Andreas Dilger1-0/+2
too long i_size for slow and fast symlinks, i_size_high set, multiple blocks for slow symlinks.
2001-06-01ChangeLog, wordwrap.pl:Theodore Ts'o1-1/+1
Makefile.in: Move include/asm/types.h.in to lib/ext2fs/ext2_fs.h.in. wordwrap.pl: Add some rules which help fix up the dependencies. Many files: Move include/asm/types.h.in to lib/ext2fs/ext2_fs.h.in.
2001-05-21ChangeLog, ext2_fs.h:Theodore Ts'o1-1/+3
ext2_fs.h: Change assignment of EXT2_FEATURE_COMPAT_DIR_INDEX to make room for pre-existing usage of EXT2_FEATURE_COMPAT_EXT_ATTR. Add flag EXT2_INDEX_FL with the same codepoint as EXT2_BTREE_FL.
2001-05-14Many files:Theodore Ts'o1-0/+622
alloc.c, alloc_tables.c, badblocks.c, bb_compat.c, bb_inode.c, bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c, check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c, dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c, expanddir.c, ext2_fs.h, fileio.c, finddev.c, flushb.c, freefs.c, get_pathname.c, getsize.c, icount.c, imager.c, initialize.c, inline.c, inode.c, irel_ma.c, ismounted.c, link.c, lookup.c, mkdir.c, mkjournal.c, namei.c, native.c, newdir.c, nt_io.c, openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c, rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c, tst_byteswap.c, tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c, valid_blk.c, version.c, write_bb_file.c, ext2_fs.h: Moved file from include/linux. Adjust all files in this directroy to include this file.