git: ext2fs: refuse read-write mounts of extent filesystems
Aaron LI
aly at crater.dragonflybsd.org
Fri Oct 23 06:19:04 PDT 2026
commit 91bbce815a3db4bc65ba77b76b4e8ad92d57c23a
Author: David Bidner <david at crap.solutions>
Date: Thu Oct 22 14:04:01 2026 +0200
ext2fs: refuse read-write mounts of extent filesystems
The extent reader cannot write: with EXT2F_INCOMPAT_EXTENTS set a
read-write mount lets inode and directory updates through and only then
fails the data blocks with EINVAL, leaving the filesystem inconsistent
(e2fsck reports a file with a size but no blocks).
Refuse the read-write mount with the same warning style as the other
unsupported-feature checks. Read-only mounts are unaffected and can
still be reloaded; upgrading such a mount to read-write is refused.
ext2_reload() asked ext2_check_sb_compat() with a hard-coded "not
read-only", so a read-only reload of an extent filesystem failed with
EIO once this check existed. Pass the mount's read-only state.
The check keys on the filesystem feature bit, so an ext3 filesystem
converted with tune2fs -O extents is refused for read-write mounts too,
although it mounted read-write before this change.
An inode with the extents flag on a filesystem without the feature bit
is not covered by the check: it takes the extent path, and mounted
read-write it can reach the unimplemented write path, as before.
Mounting untrusted images read-write remains unsupported.
Bug: https://bugs.dragonflybsd.org/issues/3451
Summary of changes:
sys/vfs/ext2fs/ext2_vfsops.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/91bbce815a3db4bc65ba77b76b4e8ad92d57c23a
--
DragonFly BSD source repository
More information about the Commits
mailing list