[DragonFlyBSD - Bug #3451] ext2fs: read ext4 extent-mapped inodes (read-only)
sigttou
bugtracker-admin at leaf.dragonflybsd.org
Thu Oct 22 09:24:46 PDT 2026
Issue #3451 has been updated by sigttou.
File 0001-ext2-sync-FreeBSD-changes-except-large-sectorsize-di.patch added
File 0002-ext2fs-read-ext4-extent-mapped-inodes.patch added
File 0003-ext2fs-do-not-synthesize-a-generation-number-on-inod.patch added
File 0004-ext2fs-refuse-read-write-mounts-of-extent-filesystem.patch added
# ext2: sync FreeBSD changes except large sectorsize disks support: Yusuf Khan's commit from GitHub PR #31.
# ext2fs: read ext4 extent-mapped inodes: read-only extent tree walk and bmap ported from FreeBSD. This is my earlier patch 1 plus validation of corrupt extent trees and unwritten extents (read as zeros).
# ext2fs: do not synthesize a generation number on inode lookup: my earlier patch 2
# ext2fs: refuse read-write mounts of extent filesystems: the extent write path is not there, so a read-write mount would leave the filesystem inconsistent.
The extent write path from #3355 is not included. Because of patch 4, every filesystem with the extents feature is refused for read-write mounts, including an ext3 converted with tune2fs -O extents, which mounted read-write before.
----------------------------------------
Bug #3451: ext2fs: read ext4 extent-mapped inodes (read-only)
http://bugs.dragonflybsd.org/issues/3451#change-14905
* Author: sigttou
* Status: New
* Priority: Normal
* Category: Driver
* Target version: 6.6
* Start date: 2026-10-16
----------------------------------------
@ext2fs@ advertises @EXT2F_INCOMPAT_EXTENTS@, but the extent lookup path is
stubbed out: @ext4_bmapext()@ and @ext4_ext_find_extent()@ both return @EINVAL at . @mkfs.ext4@ creates every
inode extent-mapped by default, so a read-only mount of a Linux ext4 filesystem succeeds (@statfs@
reads only the superblock) but every directory lookup and @readdir@ fails with @EINVAL at .
Port the read-only extent tree walk and the extent bmap from FreeBSD main
(d7d237ce731f), following the extent read path (d7511a40a749, b394cd1e28f1, 5679656e09fb).
The extent write path (allocation, truncation and removal) remains unimplemented.
The second patch is required for @metadata_csum@ filesystems (directory block checksums)
---Files--------------------------------
0001-ext2-sync-FreeBSD-changes-except-large-sectorsize-di.patch (5.49 KB)
0002-ext2fs-read-ext4-extent-mapped-inodes.patch (15.9 KB)
0003-ext2fs-do-not-synthesize-a-generation-number-on-inod.patch (1.44 KB)
0004-ext2fs-refuse-read-write-mounts-of-extent-filesystem.patch (2.44 KB)
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list