From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.42 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796181339; b=2RlrwivuRunEinIaOOPCnZhghu0eFIzsr7qBfLr3T7h3lQMaKsFk0RSTLHnbgUjNoOlC ha2tbysY2lLVvpq/N/NRMGSySNGsaRl4zhwg4rt6U79Nfdf7UHycXFwmK+p1AWwEPkGiZ NSx3HKZXWtTClM+GzzLFmMPp4AttcbG3qTkgdsYN2jNeAC3b56C33BkrPUdSe21zrO2qI l0rLbg16TznVfyZQzN51XVc3E1U9akVjDfnf/LzPGsfB1O3U3AvJcWhgDu1GnOF4c7XQw erKlMWeuDbNQ4Lb+dHka9NX0z6XsLG/LMNZQYE4hCeNIvwXm1ej8vIlAmwPP8l9EPHA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796181339; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=kGi0BXqiXtzeJkySPvyRoBCp6pSyJjx7itfRCAdRoBs=; b=4rar4JbETJUQFSSnZaYfTPLtfKTdZn9uPpiR+s6a+yqubpxf7M3mszoqMwXa0zVqN7sY JmFJN4hR6TZuXRuhDoOM8GAFnQEnh84bZ3DLtOpgZ+CocKybFQFTkIUggZe7fXmbtEOBw ytFgtirAZXzqE45MujLV6AQPFCc5FyihxEEpNwDhdoi9aADYa1YwONfugSpV+MPOPVGmy +xFke7/cbncYOqOtbIgrZeqsv+3vQkZDu0TtCD8Qh2oFg/vTVRYbHOW676FpNow8e2hQa bLuK2AvM2+32a2evDwMSqrIbwobaCSr+DqK0t99bXmBm8jSUVSd115oaWW6lkZBo1ZQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jSh4IV9k; arc=none smtp.remote-ip=209.85.221.42 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B29D606A323 for ; Wed, 2 Dec 2026 03:15:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0B29D606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jSh4IV9k Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-492690dd5daso9681519f8f.1 for ; Tue, 01 Dec 2026 19:15:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796181337; x=1796786137; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=kGi0BXqiXtzeJkySPvyRoBCp6pSyJjx7itfRCAdRoBs=; b=jSh4IV9kw1rQqLhnlXNK+HgI8y6TD7OwBREQqZGHhLF1W3/qH3Y7rqp5gsAyGwm5Qd FRJh6IHACbcFkx0XtLVWcOqvNhIuXGuHZ6eRqMm6HmcnFrL6Sjn9RjmSyXHjnhCYXWhQ oryWIJXJtNsb+SLff0DUnWZQw8Ozc+NcIr2i50GviYZ08hKbtaYAAmAeX9VPOua0bOui 9D6Hjux+We0LrZwSDZi5pbbsYFbYwkwWwsfkK87opJnarGlFUcJ2mj54/IF+z+U6QAWL LvW8FTsu/2yz7w8Y8tEoU569gL8KD0QOM6rZ/uHL+OFkMuApmfD1tcYHYQS9e2H24oa/ rmVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796181337; x=1796786137; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=kGi0BXqiXtzeJkySPvyRoBCp6pSyJjx7itfRCAdRoBs=; b=iA9O4W7Z6hmzdSwQkukeAeJK+kdSNvKrEznWYevL9AEWEqcA4C9shtqmXQNDL0dn7G 86/eA+U/a3mUotHubnLH38hZAQSZHnrCAahqW9rwc7xMWewEV/Qh6tLWHV0OYLwEvjtm vDtT4KvMgYN6dEGj/SU7LiyD3sbSLAlH4X3QueoejajoHjVxXnOKXaQIlIGNuXEYn84s dIsrQp/GAgOuXpbp8aNjOFLY+TbgxlrE8jlRlCe2DyFFB3Oao9Oe+oJv+ANxPs3Rfa/9 Wd5Lw9wm17iak93VoG9Uczzcv6BNFsuxVOx4A9lBJVeehHzP5rzCj3MvCEEyTtXpRcxi uKrg== X-Forwarded-Encrypted: i=1; AL+hErFv9+k7LJl4LX2uRXG4HmgGMOBI8mhuoRYLa/Fr9oDG3stOXvdzro5d2Faqnf2rRVTf3hspYojN9aFb+w==@vger.kernel.org X-Gm-Message-State: APuU4Z8UqOsCOhDSbsZ8B1vS9jH21vrShyjyGS2ynRYIMUJuL4Lr8R+6 F6mtoNgaBE6Lrdtyuo7xSZ67Dbr44jpGGWZU4qLico6LR7bOAcG2xI2x X-Gm-Gg: AZFdTZcaRUyXA5rUSiUIQEQsJOjNmZ84DPk/U6CCP5cOiM3tcan0EJ1mz4VIYD3v4DU 3gLP8ue5KnLDB5fLPAItBk1IUDi0O1Z3i9qBxQ0xr6cQX9uWl3H9X95XDkiPK00iKbeikRxzfJs r5Gojosbjs1vEK8C96QOK7538RY91XuA4qXEVsBNKRJ/MssFwnnjE1WAQM9pN7GJKcvKwLK2rg5 hpU86+mNrOVcYR3h/v2ko8xdO7R8PyYYIYBesUPYUljmRnrXVvkMQAFToXV0vEEs+S1Wk+6a9ET RRoaY7TU51Hb9hulep5BxXoAHdDdNIa68avrVYGYeVEhwKlnU8O5qUE+DnBOi1cGEZBCEBLS3Uc qCfTUdDgr4FW7OF4yWcKoPSarq4rTFrn69kxhJxuhYzYoS1MP1riKtt6GXMQsYJQrgn02OJklGr OqE51dZoefJ/Z5wbxhLT7CsTx7x1Ljuz6whywnjuWZXWcuccwTY/DPjfdY7/TA9AhquLHPQhl4e dtINjcwlw2a2Iin5XnlsBwBLXM13m/K2fQBi6IYTYgpxMemTxcshIX+vyP2HmRB5EHGk+B2f41j W+zEAzfvgeqOZcUjgtGzeZoRxI8yT3SNmmxlRA== X-Received: by 2002:a5d:5888:0:b0:48e:4300:c70e with SMTP id ffacd0b85a97d-4abb46bc414mr72657462f8f.46.1796181337234; Tue, 01 Dec 2026 19:15:37 -0800 (PST) Received: from NULL.Home.net ([2001:8a0:7280:4000:12d:c3b9:cecc:8966]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab65cb4341sm73334766f8f.4.2026.12.01.19.15.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 19:15:35 -0800 (PST) From: Eric Curtin To: linux-kernel@vger.kernel.org Cc: Eric Curtin , Ryan Roberts , ceph-devel@vger.kernel.org, ecryptfs@vger.kernel.org, fuse-devel@lists.linux.dev, gfs2@lists.linux.dev, linux-afs@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-btrfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org Subject: [RFC PATCH v2 00/22] fs: Prepare for boot-time page size selection on arm64 Date: Wed, 2 Dec 2026 03:15:03 +0000 Message-ID: <20261202031533.1665444-1-ericcurtin17@gmail.com> X-Mailer: git-send-email 2.56.1 X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Eric Curtin This series is part of the boot-time page size selection work for arm64, posted as RFC [1]. With CONFIG_ARM64_BOOT_TIME_PAGE_SIZE=y, PAGE_SIZE, PAGE_SHIFT and PAGE_MASK are variables chosen at boot with arm64.pagesize=, so code that needs a compile-time constant (array sizes, struct layouts, static initialisers, BUILD_BUG_ON(), case labels, #if) has to use the new PAGE_SIZE_MIN/PAGE_SIZE_MAX limits or a run-time value instead. For fixed page sizes both limits equal PAGE_SIZE, so behaviour should not change. The patches here convert filesystems. They apply on top of the core series [1], whose patch 1 adds PAGE_SIZE_MIN/MAX, and are otherwise independent of each other. Patches authored by Ryan Roberts come from his v1 [2], updated for v7.4-rc5. The full tree is at: https://github.com/ericcurtin/linux/tree/boot-time-page-size-v2 Testing: allmodconfig with the option enabled builds cleanly on arm64 with all of these applied, and the defconfig kernel boots to userspace with 4K, 16K and 64K pages under QEMU/KVM (details in [1]). The code in this series is not otherwise exercised on hardware. Tool use: these conversions were prepared with an LLM coding assistant (opencode with Claude Sonnet), driven by build errors and followed by an automated review pass. I have not hand-audited every patch, so please review with that in mind and tell me where you would prefer a different approach for your subsystem. [1] https://lore.kernel.org/all/20261201015240.1017259-1-ericcurtin17@gmail.com/ [2] https://lore.kernel.org/all/20241014105514.3206191-1-ryan.roberts@arm.com/ Eric Curtin (17): smb: client: Use PAGE_SIZE_MIN in the lock element build checks fs/resctrl: Define the kernfs_ops as page-size variables ocfs2: Use PAGE_SIZE_MIN/MAX for the page-count limits ntfs3: Use MAX_BUF_PER_PAGE_SIZE_MAX for struct ntfs_buffers ntfs: Use PAGE_SIZE_MIN in NTFS_WOF_MAX_PAGES nilfs2: Test PAGE_SIZE at run time in the rec_len conversions jfs: Use PAGE_SIZE_MAX to size the metapage anchor arrays isofs: Use PAGE_SIZE_MAX for zisofs_sink_page ext4: Use PAGE_SIZE_MAX for the inline KUnit test data buffer ext2: Test PAGE_SIZE at run time in the rec_len conversions erofs: Make the decompressor bounce buffers flexible arrays ecryptfs: Resolve the PAGE_SIZE cache sizes at cache creation time dlm: Use PAGE_SIZE_MIN in the lowcomms buffer size build check cramfs: Allocate the read buffers at init time ceph: Use PAGE_SHIFT_MIN in the ceph_fscrypt_blocks() build check btrfs: Use PAGE_SIZE_MAX in a static_assert and min_t() for PAGE_SHIFT afs: Use PAGE_SIZE_MAX to size struct afs_xdr_dir_page Ryan Roberts (5): fuse: Check CUSE and ioctl buffer sizes against PAGE_SIZE_MIN btrfs: Use PAGE_SIZE_MAX and PAGE_SIZE_MIN for compile-time checks NFSv4: Use PAGE_SIZE_MIN to size ACL and xattr page arrays coredump: Use PAGE_SIZE_MIN for the zero-fill buffer fat: Use MAX_BUF_PER_PAGE_SIZE_MAX to size buffer_head arrays