Add non-GPL ext2 filesystem (port from FreeBSD)

Operating Systems / DragonFlyBSD - Tomohiro Kusumi [netbsd.org] - 17 July 2020 16:12 UTC

The new ext2 will replace the existing sys/gnu/vfs/ext2fs in future, which is known to have lots of issues. This is already better than sys/gnu/vfs/ext2fs in many ways, but will keep it as an option for now as there seems to be htree dirents and/or vop_readdir related bugs.

The new implementation supports ext3 htree dirents. Read support for ext4 extents which exists in FreeBSD ext2 isn't implemented yet (TODO). ACL/xattr are unsupported, and likely never will be.

With exception of DragonFly VFS specific part that can't reuse FreeBSD code (vfsops, many vnops, bread/getblk/bio i/f difference, etc), the new ext2 is designed to be close to upstream as much as possible. The code is there for a reason to make clear the *real* diff without introducing nonfunctional diff noises.

cfe6039057 Add non-GPL ext2 filesystem (port from FreeBSD)
sys/vfs/Makefile | 2 +-
sys/vfs/ext2fs/Makefile | 4 +
sys/vfs/ext2fs/ext2_alloc.c | 1616 +++++++++++++++++++++++++++++
sys/vfs/ext2fs/ext2_balloc.c | 298 ++++++
sys/vfs/ext2fs/ext2_bmap.c | 368 +++++++
sys/vfs/ext2fs/ext2_csum.c | 735 +++++++++++++
sys/vfs/ext2fs/ext2_dinode.h | 143 +++
sys/vfs/ext2fs/ext2_dir.h | 117 +++
sys/vfs/ext2fs/ext2_extents.c | 212 ++++
sys/vfs/ext2fs/ext2_extents.h | 135 +++
sys/vfs/ext2fs/ext2_extern.h | 162 +++
sys/vfs/ext2fs/ext2_hash.c | 329 ++++++
sys/vfs/ext2fs/ext2_htree.c | 961 +++++++++++++++++
sys/vfs/ext2fs/ext2_ihash.c | 170 +++
sys/vfs/ext2fs/ext2_inode.c | 572 +++++++++++
sys/vfs/ext2fs/ext2_inode_cnv.c | 263 +++++
sys/vfs/ext2fs/ext2_lookup.c | 1267 +++++++++++++++++++++++
sys/vfs/ext2fs/ext2_mount.h | 90 ++
sys/vfs/ext2fs/ext2_subr.c | 282 +++++
sys/vfs/ext2fs/ext2_vfsops.c | 1631 +++++++++++++++++++++++++++++
sys/vfs/ext2fs/ext2_vnops.c | 2172 +++++++++++++++++++++++++++++++++++++++
sys/vfs/ext2fs/ext2fs.h | 458 +++++++++
sys/vfs/ext2fs/fs.h | 185 ++++
sys/vfs/ext2fs/htree.h | 110 ++
sys/vfs/ext2fs/inode.h | 198 ++++
25 files changed, 12479 insertions(+), 1 deletion(-)

Upstream: gitweb.dragonflybsd.org


  • Share