]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
libext2fs: fix orphan file size > kernel limit with large blocksize
authorBaokun Li <libaokun1@huawei.com>
Wed, 12 Nov 2025 12:21:57 +0000 (20:21 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 9 Dec 2025 13:36:54 +0000 (08:36 -0500)
commit6f03c698ef53bb9d0cd42c9bd0b68e8ce72f8345
treeb7fb809023b97721bd8cc9d9a1a06a6f42057a4f
parent0b2752ce6276b383a5254cd766204f81f41b6631
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

Therefore, synchronize the kernel change to e2fsprogs to avoid creating
orphan files larger than the kernel limit.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Message-ID: <20251112122157.1990595-1-libaokun@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext2fs.h
lib/ext2fs/orphan.c