History log of /freebsd-current/sys/fs/ext2fs/ext2_extern.h
Revision Date Author Comments
# 29363fb4 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 2ff63af9 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .h pattern

Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/


# 645027c8 07-Dec-2020 Kirk McKusick <mckusick@FreeBSD.org>

In ext2fs, BA_CLRBUF is used in ext2_balloc() not UFS_BALLOC().

Noted by: kib
MFC after: 3 days
Sponsored by: Netflix


# bb3c01ec 06-Dec-2020 Kirk McKusick <mckusick@FreeBSD.org>

Document the BA_CLRBUF flag used in ufs and ext2fs filesystems.

Suggested by: kib
MFC after: 3 days
Sponsored by: Netflix


# 3767ed5b 18-Feb-2020 Fedor Uporov <fsu@FreeBSD.org>

Add a EXT2FS-specific implementation for lseek(SEEK_DATA).

The lseek(SEEK_DATA) optimization logic could be simply borrowed from ufs side.
See, https://reviews.freebsd.org/D19599.

Reviewed by: pfg
MFC after: 1 week

Differential Revision: https://reviews.freebsd.org/D23605


# ebc94b66 16-Apr-2019 Fedor Uporov <fsu@FreeBSD.org>

ext2fs: Initial version of DTrace support.

Reviewed by: pfg, gnn
MFC after: 1 week

Differential Revision: https://reviews.freebsd.org/D19848


# 6e38bf94 04-Mar-2019 Fedor Uporov <fsu@FreeBSD.org>

Make superblock reading logic more strict.

Add more on-disk superblock consistency checks to ext2_compute_sb_data() function.
It should decrease the probability of mounting filesystems with corrupted superblock data.

Reviewed by: pfg
MFC after: 1 week

Differential Revision: https://reviews.freebsd.org/D19322


# e49d64a7 21-Aug-2018 Fedor Uporov <fsu@FreeBSD.org>

Fix directory blocks checksum updating logic.

Count dirent tail in the searchslot logic in case of directory block search.
Add htree root csum update function call in case of rename.


# 6d4a4ed7 13-May-2018 Fedor Uporov <fsu@FreeBSD.org>

Fix directory blocks checksumming.

Reviewed by: pfg
MFC after: 3 months

Differential Revision: https://reviews.freebsd.org/D15396


# 512f29d1 14-Jan-2018 Fedor Uporov <fsu@FreeBSD.org>

Add metadata_csum feature support.

Reviewed by: pfg (mentor)
Approved by: pfg (mentor)
MFC after: 6 months

Differential Revision: https://reviews.freebsd.org/D13810


# 3acd9182 05-Jan-2018 Fedor Uporov <fsu@FreeBSD.org>

Add 64bit feature support.

Reviewed by: kevlo, pfg (mentor)
Approved by: pfg (mentor)
MFC after: 6 months

Differential Revision: https://reviews.freebsd.org/D11530


# 51369649 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# ffbde5ea 24-Oct-2017 Fedor Uporov <fsu@FreeBSD.org>

Fix physical block number overflow in different places.

Approved by: pfg (mentor)
MFC after: 6 months


# ccf2e812 17-Oct-2017 Ryan Libby <rlibby@FreeBSD.org>

ext2: delete redundant decl of ext2_fserr

Fix gcc build after r324706.

Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D12709


# b394cd1e 17-Oct-2017 Fedor Uporov <fsu@FreeBSD.org>

Add inital extents read-write support.

Approved by: pfg (mentor)
MFC after: 6 months
RelNotes: Yes

Differential Revision: https://reviews.freebsd.org/D12087


# 72530f91 27-Sep-2017 Fedor Uporov <fsu@FreeBSD.org>

Add check to avoid raw inode iblocks fields overflow in case of huge_file feature.
Use the Linux logic for now.

Reviewed by: pfg (mentor)
Approved by: pfg (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12131


# d23db91e 20-Jun-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

ext2fs: Add uninit_bg feature support.

From the linux tune2fs(8) manpage:
"Allow the kernel to initialize bitmaps and inode tables and keep a high
watermark for the unused inodes in a filesystem, to reduce e2fsck(8) time.
This first e2fsck run after enabling this feature will take the full time,
but subsequent e2fsck runs will take only a fraction of the original time,
depending on how full the file system is."

Submitted by: Fedor Uporov
Differential Revision: https://reviews.freebsd.org/D11211


# 34f43888 03-May-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

ext2fs: add read-write support for Extended Attributes.

Extended attributes and their particular implementation in linux are
different from FreeBSD so in this case we have started diverging from
the UFS EA implementation, which would be the natural reference.

Depending on future progress implementing ACLs this approach may change
but for now bring to the tree an implementation that is consistent and
can be tested.

Submitted by: Fedor Uporov

Differential Revision: https://reviews.freebsd.org/D10460


# bf9a211d 28-Dec-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

style(9) cleanups.

Just to reduce some of the issues found with indent(1).

MFC after: 1 week


# fca15474 02-Dec-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

ext2fs: renumber the license clauses to avoid skipping #3.

This is to keep consistency with other files, and help license-checking
utilities determine the number of clauses that apply.

No functional change.


# 9824e4ad 21-Jan-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

ext2fs: Bring back the htree dir_index implementation.

The htree dir_index is perhaps one of the most characteristic
features of the linux ext3 implementation. It was removed
in r281670, due to repeated bug reports.

Damjan Jovanic detected and fixed three bugs and did some
stress testing by building Apache OpenOffice on top of it
so it is now in good shape to bring back.

Differential Revision: https://reviews.freebsd.org/D5007

Submitted by: Damjan Jovanovic
Reviewed by: pfg
Tested by: pho
Relnotes: Yes
MFC after: 2 months (only 10.x)


# f738ee48 17-Apr-2015 Pedro F. Giffuni <pfg@FreeBSD.org>

Drop experimental dir_index support.

The htree directory index is a highly desirable feature for research
purposes and was meant to improve performance in our ext2/3 driver.
Unfortunately our implementation has two problems:

- It never really delivered any performance improvement.
- It appears to corrupt the filesystem in undetermined circumstances.

Strictly speaking dir_index is not required for read/write support in
ext2/3 and our limited ext4 support still works fine without it.

Regain stability in the ext2 driver by removing it. We may need it back
(fixed) if we want to support encrypted ext4 support but thanks to the
wonders of version control we can always revert this change and bring it
back.

PR: 191895
PR: 198731
PR: 199309

MFC after: 5 days


# 33587684 12-Nov-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

ifdef ext2_print_inode which is not really used.

ext2_print_inode is not really used but it was nice to
have for initial development work. #ifdef it under a
new EXT2FS_DEBUG knob so that we don't spend time
compiling it.

MFC after: 3 days


# 3a54024d 28-Feb-2014 Pedro F. Giffuni <pfg@FreeBSD.org>

ext2fs: use of tab vs spaces.

Consistently use a single tab after a #define as mentioned in style(9).
Use tabs instead of space for indenting.
Fix a typo: "hash_vesion".

No functional change.

MFC after: 3 days


# 70097aac 13-Aug-2013 Pedro F. Giffuni <pfg@FreeBSD.org>

Define ext2fs local types and use them.

Add definitions for e2fs_daddr_t, e4fs_daddr_t in addition
to the already existing e2fs_lbn_t and adjust them for ext4.
Other than making the code more readable these changes should
fix problems related to big filesystems.

Setting the proper types can be tricky so the process was
helped by looking at UFS. In our implementation, logical block
numbers can be negative and the code depends on it. In ext2,
block numbers are unsigned so it is convenient to keep
e2fs_daddr_t unsigned and use the complete 32 bits. In the
case of e4fs_daddr_t, while the value should be unsigned, for
ext4 we only need to support 48 bits so preserving an extra
bit from the sign is not an issue.

While here also drop the ext2_setblock() prototype that was
never used.

Discussed with: mckusick, bde
MFC after: 3 weeks


# d7511a40 12-Aug-2013 Pedro F. Giffuni <pfg@FreeBSD.org>

Add read-only support for extents in ext2fs.

Basic support for extents was implemented by Zheng Liu as part
of his Google Summer of Code in 2010. This support is read-only
at this time.

In addition to extents we also support the huge_file extension
for read-only purposes. This works nicely with the additional
support for birthtime/nanosec timestamps and dir_index that
have been added lately.

The implementation may not work for all ext4 filesystems as
it doesn't support some features that are being enabled by
default on recent linux like flex_bg. Nevertheless, the feature
should be very useful for migration or simple access in
filesystems that have been converted from ext2/3 or don't use
incompatible features.

Special thanks to Zheng Liu for his dedication and continued
work to support ext2 in FreeBSD.

Submitted by: Zheng Liu (lz@)
Reviewed by: Mike Ma, Christoph Mallon (previous version)
Sponsored by: Google Inc.
MFC after: 3 weeks


# 91f5a467 06-Jul-2013 Pedro F. Giffuni <pfg@FreeBSD.org>

Initial implementation of the HTree directory index.

This is a port of NetBSD's GSoC 2012 Ext3 HTree directory indexing
by Vyacheslav Matyushin. It was cleaned up and enhanced for FreeBSD
by Zheng Liu (lz@).

This is an excellent example of work shared among different projects:
Vyacheslav was able to look at an early prototype from Zheng Liu who
was also able to check the code from Haiku (with permission).

As in linux, the feature is not available by default and must be
enabled explicitly with tune2fs. We still do not support the
workarounds required in readdir for NFS.

Submitted by: Zheng Liu
Tested by: Mike Ma
Sponsored by: Google Inc.
MFC after: 1 week


# fafb835a 26-Jun-2013 Pedro F. Giffuni <pfg@FreeBSD.org>

Minor sorting.

MFC after: 3 days


# da057ed2 22-Jun-2013 Pedro F. Giffuni <pfg@FreeBSD.org>

Define and use e2fs_lbn_t in ext2fs.

In line to what is done in UFS, define an internal type
e2fs_lbn_t for the logical block numbers.

This change is basically a no-op as the new type is unchanged
(int32_t) but it may be useful as bumping this may be required
for ext4fs.

Also, as pointed out by Bruce Evans:

-Use daddr_t for daddr in ext2_bmaparray(). This seems to
improve reliability with the reallocblks option.
- Add a cast to the fsbtodb() macro as in UFS.

Reviewed by: bde
MFC after: 3 days


# 5b63c125 15-Dec-2011 Pedro F. Giffuni <pfg@FreeBSD.org>

Bring in reallocblk to ext2fs.

The feature has been standard for a while in UFS as a means to reduce
fragmentation, therefore maintaining consistent performance with
filesystem aging. This is also very similar to what ext4 calls
"delayed allocation".

In his 2010 GSoC, Zheng Liu ported and benchmarked the missing
FANCY_REALLOC code to find more consistent performance improvements than
with the preallocation approach.

PR: 159233
Author: Zheng Liu <gnehzuil AT SPAMFREE gmail DOT com>
Sponsored by: Google Inc.
Approved by: jhb (mentor)
MFC after: 2 weeks


# 9e880b87 28-Apr-2011 John Baldwin <jhb@FreeBSD.org>

Sync with several changes in UFS/FFS:
- 77115: Implement support for O_DIRECT.
- 98425: Fix a performance issue introduced in 70131 that was causing
reads before writes even when writing full blocks.
- 98658: Rename the BALLOC flags from B_* to BA_* to avoid confusion with
the struct buf B_ flags.
- 100344: Merge the BA_ and IO_ flags so so that they may both be used in
the same flags word. This merger is possible by assigning the IO_ flags
to the low sixteen bits and the BA_ flags the high sixteen bits.
- 105422: Fix a file-rewrite performance case.
- 129545: Implement IO_INVAL in VOP_WRITE() by marking the buffer as
"no cache".
- Readd the DOINGASYNC() macro and use it to control asynchronous writes.
Change i-node updates to honor DOINGASYNC() instead of always being
synchronous.
- Use a PRIV_VFS_RETAINSUGID check instead of checking cr_uid against 0
directly when deciding whether or not to clear suid and sgid bits.

Submitted by: Pedro F. Giffuni giffunip at yahoo


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# e09c00ca 14-Jan-2010 Ulf Lilleengen <lulf@FreeBSD.org>

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>