]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/mount_setattr: increase tmpfs size for idmapped mount tests
authorChristian Brauner <brauner@kernel.org>
Tue, 17 Mar 2026 15:59:45 +0000 (16:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 11:25:55 +0000 (13:25 +0200)
commit935d5a4d41a4e0a28b27ef27f67546bc39c06c26
treeaddc81ce12d069afdba6651cb041cc1d8fb60e1f
parent4b658f13be9f8216be9e185c8e1ea4b70f618950
selftests/mount_setattr: increase tmpfs size for idmapped mount tests

[ Upstream commit c465f5591aa84a6f85d66d152e28b92844a45d4f ]

The mount_setattr_idmapped fixture mounts a 2 MB tmpfs at /mnt and then
creates a 2 GB sparse ext4 image at /mnt/C/ext4.img. While ftruncate()
succeeds (sparse file), mkfs.ext4 needs to write actual metadata blocks
(inode tables, journal, bitmaps) which easily exceeds the 2 MB tmpfs
limit, causing ENOSPC and failing the fixture setup for all
mount_setattr_idmapped tests.

This was introduced by commit d37d4720c3e7 ("selftests/mount_settattr:
ensure that ext4 filesystem can be created") which increased the image
size from 2 MB to 2 GB but didn't adjust the tmpfs size.

Bump the tmpfs size to 256 MB which is sufficient for the ext4 metadata.

Fixes: d37d4720c3e7 ("selftests/mount_settattr: ensure that ext4 filesystem can be created")
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/mount_setattr/mount_setattr_test.c