aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/fs/ext2fs/ext2_fs.h
Commit message (Collapse)AuthorAgeFilesLines
* Bring in the ext2fs work done by Aditya Sarawgi during and after Google SummerUlf Lilleengen2010-01-141-556/+0
| | | | | | | | | | | | | | | | | | of Code 2009: - BSDL block and inode allocation policies for ext2fs. This involves the use FFS1 style block and inode allocation for ext2fs. Preallocation was removed since it was GPL'd. - Make ext2fs MPSAFE by introducing locks to per-mount datastructures. - Fixes for kern/122047 PR. - Various small bugfixes. - Move out of gnu/ directory. Sponsored by: Google Inc. Submitted by: Aditya Sarawgi <sarawgi.aditya AT SPAMFREE gmail DOT com> Notes: svn path=/head/; revision=202283
* - Sync our copies of ext2fs Linux headers to current Linux versions.Stanislav Sedov2009-06-031-48/+40
| | | | | | | | | | | | | | | | | | | | | | Minimize differencies between our ext2fs headers and relevant Linux versions by using EXT2_SB macro to access the superblock fields. Most of the differencies in access to these fields are now hidden inside this macro. - Rename the s_db_per_group field of ext2fs_sb_info to s_gdb_count to reflect the similar change in Linux headers. New name also seem to be more appropriate for this field. - Use proper types for s_first_inode and s_inode_size in-core superblock fields. Now they reflec types used in the on-disk superblock version. - Add support for older filesystem revisions that doesn't have proper s_first_ino and s_inode_size fields in the on-disk superblock. In these cases predefined values for these fields are used. - Add simple sanity checks for s_first_inode and s_inode_size correctness. Reviewed by: bde (previous version) MFC after: 2 weeks Notes: svn path=/head/; revision=193377
* - Obtain inode sizes and location of the first inode based on the contentsStanislav Sedov2009-01-181-2/+2
| | | | | | | | | | | of superblock rather than using hardcoded values. This fixes ext2fs on filesystems with inode sized other than 128. Submitted by: Alex Lyashkov <Alexey.Lyashkov@Sun.COM> (based on) MFC after: 2 weeks Notes: svn path=/head/; revision=187395
* Add standard GPL boilerplate to these files. They are the only onesWarner Losh2005-06-161-0/+14
| | | | | | | | | | | contaminated with the GPL code. While this information was present in the COPYRIGHT.INFO file, it is FreeBSD's standard practice to, where possible, include explicit license information in files. Approved by: release engineer (scottl) Notes: svn path=/head/; revision=147408
* /* -> /*- for copyright notices, minor format tweaks as necessaryWarner Losh2005-01-061-2/+2
| | | | Notes: svn path=/head/; revision=139778
* Add partial support for large (>4GB) files on ext2 filesystems. ThisTim J. Robbins2004-02-181-1/+2
| | | | | | | | | | | support is partial in that it will refuse to create large files on filesystems that haven't been upgraded to EXT2_DYN_REV or that don't have the EXT2_FEATURE_RO_COMPAT_LARGE_FILE flag set in the superblock. MFC after: 2 weeks Notes: svn path=/head/; revision=125962
* Complete the separation of ext2fs from ufs by copying the remainingIan Dowse2002-05-161-23/+0
| | | | | | | | | | | | | shared code and converting all ufs references. Originally it may have made sense to share common features between the two filesystems, but recently it has only caused problems, the UFS2 work being the final straw. All UFS_* indirect calls are now direct calls to ext2_* functions, and ext2fs-specific mount and inode structures have been introduced. Notes: svn path=/head/; revision=96749
* Update to C99, s/__FUNCTION__/__func__/,David E. O'Brien2001-12-101-1/+1
| | | | | | | also don't use ANSI string concatenation. Notes: svn path=/head/; revision=87599
* The addition of i_dirhash to struct inode pushed RELENG_4'sIan Dowse2001-09-241-2/+2
| | | | | | | | | | | | | | | | sizeof(struct inode) into a new malloc bucket on the i386. This didn't happen in -current due to the removal of i_lock, but it does no harm to apply the workaround to -current first. Reduce the size of the i_spare[] array in struct inode from 4 to 3 entries, and change ext2fs to use i_din.di_spare[1] so that it does not need i_spare[3]. Reviewed by: bde MFC after: 3 days Notes: svn path=/head/; revision=83899
* Support filesystems with the not-so-new "sparse_superblocks" feature.Bruce Evans2000-11-031-1/+1
| | | | | | | | | | | | | | When this feature is enabled, mke2fs doesn't necessarily allocate a super block and its associated descriptor blocks for every group. The (non-)allocations are reflected in the block bitmap. Since the filesystem code doesn't write to these blocks except for the first superblock, all it has to do to support them is to not count them in ext2_statfs() and not attempt to check them at mount time in ext2_check_blocks_bitmap() (the check has never been enabled in FreeBSD anyway). Notes: svn path=/head/; revision=68291
* Don't allow mounting (or mounting R/W) of filesystems with unsupportedBruce Evans2000-01-021-3/+0
| | | | | | | | | | | | | | features (except for file types in directory entries, which will be supported soon). Centralized the magic number and compatibility checking. Dropped support for ancient (pre-0.2b) filesystems, as in the Linux version. Our "support" consisted of printing more details in the error message before failing at mount time. Notes: svn path=/head/; revision=55313
* Merged changes in ext2_fs.h between Linux 1.2.2 and Linux 2.3.35. TheBruce Evans2000-01-011-48/+170
| | | | | | | | | | | | | main changes are: - many things are more dynamic; e.g., the inode size is a new parameter in the superblock instead of a constant. - extensions are controlled by new flags in the superblock. - directory entries may have a file type field. These changes are not used yet, except for a spelling change which affects ext2_cnv.c Notes: svn path=/head/; revision=55304
* Merged cosmetic changes from the initial import on the vendor branchBruce Evans2000-01-011-62/+118
| | | | | | | | | (mainly things that were lost or misformatted in a different way by moving them to ext2_fs_i.h and back, and ifdefs for user mode that were excessively edited). Notes: svn path=/head/; revision=55303
* Use an ifdef in ext2_fs.h instead of a bogus separate file (ext2_fs_i.h)Bruce Evans2000-01-011-0/+67
| | | | | | | | | | | | | to avoid the namespace problems caused by <ufs/ufs/inode.h> #defining i_mode, etc. ext2_fs_i.h had nothing to do with the Linux version. It was a small part of the Linux version of ext2_fs.h (the part that declares extra in-core fields for an inode). We don't need it because we use the ufs in-core inode for the extra fields. Notes: svn path=/head/; revision=55299
* Fixed bloatage of `struct inode'. We used 5 "spare" fields for ext2fs,Bruce Evans1998-10-131-2/+2
| | | | | | | | | | | | | | | | | but when i_effnlink was added to support soft updates, there was only room for 4 spares. The number of spares was not reduced, so the inode size became 260 (on i386's), or 512 after rounding up by malloc(). Use one spare field in `struct dinode' instead of the 5th spare field in the inode and reduced to 4 spares in the inode so that the size is 256 again. Changed the types of the spares in the inode from int to u_int32_t so that the inode size has more chance of being <= 256 under other arches, and downdated ext2fs to match (it was broken to use ints before rev.1.1). Notes: svn path=/head/; revision=40304
* Removed __FreeBSD__ ifdefs.Bruce Evans1997-12-021-10/+0
| | | | Notes: svn path=/head/; revision=31483
* Use __i386__ instead of i386 in ifdefs.Bruce Evans1997-04-011-1/+1
| | | | | | | Don't compile unused (debugging?) functions. Notes: svn path=/head/; revision=24491
* Main code for the ext2fs filesystem. Please refer to the COPYRIGHT.INFOJohn Dyson1995-11-051-0/+340
file for GPL restrictions. This code was ported to the BSD platform by Godmar Back <gback@facility.cs.utah.edu> and specifically to FreeBSD by John Dyson. This code is still green and should be used with caution. Additional changes to UFS necessary to make this code work will be commited seperately. Submitted by: Godmar Back <gback@facility.cs.utah.edu> Obtained from: Lites/Mach4 Notes: svn path=/head/; revision=12115