]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
libext2fs: fix orphan file size > kernel limit with large blocksize maint master
authorBaokun Li <libaokun1@huawei.com>
Thu, 20 Nov 2025 13:55:14 +0000 (21:55 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 12 Mar 2026 22:30:13 +0000 (18:30 -0400)
commita9f482e55f3ca384226e76fceb15f274698cce93
tree4dd0e7e89145a9ccf4ed4e555f185c776aaa9c2a
parent782f43e32b58b37277f0ec6af405d5c45245b8c1
libext2fs: fix orphan file size > kernel limit with large blocksize

Kernel commit 0a6ce20c1564 ("ext4: verify orphan file size is not too big")
limits the maximum supported orphan file size to 8 << 20.

However, in e2fsprogs, the orphan file size is set to 32–512 filesystem
blocks when creating a filesystem.

With 64k block size, formatting an ext4 fs >32G gives an orphan file bigger
than the kernel allows, so mount prints an error and fails:

    EXT4-fs (vdb): orphan file too big: 8650752
    EXT4-fs (vdb): mount failed

Thus, orphan file size is capped at 512 filesystem blocks in both e2fsprogs
and the kernel.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Message-ID: <20251120135514.3013973-1-libaokun@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/orphan.c