]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fs/kernfs: raise sb->maxbytes to MAX_LFS_FILESIZE
authorJane Chu <jane.chu@oracle.com>
Tue, 11 Nov 2025 20:26:06 +0000 (13:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2025 14:18:13 +0000 (15:18 +0100)
On an ARM64 A1 system, it's possible to have physical memory span
up to the 64T boundary, like below

$ lsmem -b -r -n -o range,size
0x0000000080000000-0x00000000bfffffff 1073741824
0x0000080000000000-0x000008007fffffff 2147483648
0x00000800c0000000-0x0000087fffffffff 546534588416
0x0000400000000000-0x00004000bfffffff 3221225472
0x0000400100000000-0x0000407fffffffff 545460846592

So it's time to extend /sys/kernel/mm/page_idle/bitmap to be able
to account for >2G number of pages, by raising the kernfs file size
limit.

Signed-off-by: Jane Chu <jane.chu@oracle.com>
Link: https://patch.msgid.link/20251111202606.1505437-1-jane.chu@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/kernfs/mount.c

index 76eaf64b9d9e084bf9af666d373580359488c355..3ac52e1417662264509a4f4f3a835e7a592f7f2e 100644 (file)
@@ -298,6 +298,7 @@ static int kernfs_fill_super(struct super_block *sb, struct kernfs_fs_context *k
        if (info->root->flags & KERNFS_ROOT_SUPPORT_EXPORTOP)
                sb->s_export_op = &kernfs_export_ops;
        sb->s_time_gran = 1;
+       sb->s_maxbytes  = MAX_LFS_FILESIZE;
 
        /* sysfs dentries and inodes don't require IO to create */
        sb->s_shrink->seeks = 0;