Commit Graph

7 Commits

Author SHA1 Message Date
Pedro F. Giffuni
051b0df565 Add some basic definitions for a future htree implementation.
MFC after:	3 days
2012-08-24 01:12:07 +00:00
Pedro F. Giffuni
035e4e0494 Add support for ns timestamps and birthtime to the ext2/3 driver.
When using big inodes there is sufficient space in ext3 to
keep extra resolution and birthtime (creation) timestamps.
The appropriate fields in the on-disk inode have been approved
for a long time but support for this in ext3 has not been
widely  distributed.

In preparation for ext4 most linux distributions have enabled
by default such bigger inodes and some people use nanosecond
timestamps in ext3. We now support those when the inode is big
enough and while we do recognize the EXT4F_ROCOMPAT_EXTRA_ISIZE,
we maintain the extra timestamps even when they are not used.

An additional note by Bruce Evans:
We blindly accept unrepresentable tv_nsec in VOP_SETATTR(), but
all file  systems have always done that.  When POSIX gets around
to  specifying the behaviour, it will probably require certain
rounding to the fs's resolution and not rejecting the request.
This unfortunately means that syscalls that set times can't
really tell if they succeeded without reading back the times
using stat() or similar and checking that they were set close
enough.

Reviewed by:	bde
Approved by:	jhb (mentor)
MFC after:	2 weeks
2012-03-08 21:06:05 +00:00
Pedro F. Giffuni
3cc6ae1f57 Update the data structures with some fields reserved for
ext4 but that can be used in ext3 mode.

Also adjust the internal inode to carry the birthtime,
like in UFS, which is starting to get some use when
big inodes are available.

Right now these are just placeholders for features
to come.

Approved by:	jhb (mentor)
MFC after:	2 weeks
2012-02-07 22:31:28 +00:00
John Baldwin
4d2ede6798 Various style fixes including using uint*_t instead of u_int*_t.
Submitted by:	Pedro F. Giffuni  giffunip at yahoo
2011-04-27 18:15:34 +00:00
John Baldwin
cd2895aab0 - Move special inode constants to ext2_dinode.h and rename them to match
NetBSD.
- Add a constant for the HASJOURNAL compat flag.

PR:		kern/153584
Submitted by:	Pedro F. Giffuni  giffunip at yahoo
2011-01-21 22:00:40 +00:00
John Baldwin
08b1d53573 Whitespace and style fixes. 2011-01-19 16:55:32 +00:00
Ulf Lilleengen
e09c00cada Bring in the ext2fs work done by Aditya Sarawgi during and after Google Summer
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>
2010-01-14 14:30:54 +00:00