Commit Graph

8 Commits

Author SHA1 Message Date
Bruce Evans
6291b96b03 Don't allow mounting (or mounting R/W) of filesystems with unsupported
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.
2000-01-02 17:40:02 +00:00
Bruce Evans
d68084cd89 Merged changes in ext2_fs.h between Linux 1.2.2 and Linux 2.3.35. The
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
2000-01-01 17:39:21 +00:00
Bruce Evans
c9fbb5bc2c Merged cosmetic changes from the initial import on the vendor branch
(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).
2000-01-01 16:26:43 +00:00
Bruce Evans
8e19715af3 Use an ifdef in ext2_fs.h instead of a bogus separate file (ext2_fs_i.h)
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.
2000-01-01 14:43:20 +00:00
Bruce Evans
d2165c2f7d Fixed bloatage of `struct inode'. We used 5 "spare" fields for ext2fs,
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).
1998-10-13 15:45:43 +00:00
Bruce Evans
2f169e4b76 Removed __FreeBSD__ ifdefs. 1997-12-02 10:39:42 +00:00
Bruce Evans
ada28e77e6 Use __i386__ instead of i386 in ifdefs.
Don't compile unused (debugging?) functions.
1997-04-01 15:10:38 +00:00
John Dyson
c33a4405f7 Main code for the ext2fs filesystem. Please refer to the COPYRIGHT.INFO
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
1995-11-05 23:25:12 +00:00