From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6863B606A338 for ; Wed, 2 Dec 2026 03:15:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=XgPweN0u; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=WzJbms5f DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=kGi0BXqiXtzeJkySPvyRoBCp6pSyJjx7itfRCAdRoBs=; b=XgPweN0umICUvlJ5IvAWtsGyJt Q5pFXvkABiJpb+gFj87d7VtNVqSL1HkLFU3e62rDVIhsuI/okTqrE2NsKVjd7hDIj7DCxkWAQ01Nu 02Hh71aQyeE+RII0tam9w3PVoq4mZWVtkwL8sOaVHHh4Gp3Zr+R4wMgUoDsfGA0YpkYpsO4o01FjG 1cMWeo9yFCFvwSf6PvnxPPZjwDgqJJCIkpZQvLpoxdbe5s7O4suoulqKgyq53mypVJ/3aN2qARV8D ZHRqAs2XyVWq2Ginmue0Yh1O7OMlpJA24YbcJO15MvoXoHIBKoFwrwqqcE0lvHznxE2bCl6XD/iiv 1/wW8e/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYaoo-0000000A44G-2fNH; Wed, 02 Dec 2026 03:15:42 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYaol-0000000A43a-2gjS for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2026 03:15:41 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-4aa5833c263so11963682f8f.2 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=lists.infradead.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=WzJbms5fkPtqMBVGOEB8k+fxH0FwPoa4jGTJ/4sKdfRbTLQ6u0K5rYcCviWmP+CL5a RuEWr8Cz5e62bhXddSxbBqtR8H3ylVaOaVizcytWjKwjHvNd4QLvIjnIsYhB46z5gE7P CW1qQ0rdGPc2dBxHZ8uify6QCXdCpvgJR0HOTTuBvcx3QhI8pixrfoAK0klQ50z7idXJ 2Igarx/aAMX+5z3WqOtGcsKU/HgmAjqkwcfCFftH+KzkEd3gQzeYhukm7mTYzVa6O/Ts vrAfzPiopzg7xe5gjBv2uaqw1Wj4nV+fiVkJbzpKo4YB9PmZY/iGRnez2Swxa8O/uTw5 EJgw== 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=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NAej0uRhDULUxKoNF6PKuHrqKYOGdR3xs51u YXJ+cXh4wfsU/Acl+IgFenRj2CTRGl9uUYpO4FasIPu2q5uHiXgKt3XvJXC4oAdyuu6qu2BFEHt qAUuFLAspi3exSbBYWRcBUhNiat0k84En/MIEw== 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-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261201_191539_703506_C0EE6041 X-CRM114-Status: GOOD ( 11.87 ) X-Spam-Score: -0.8 (/) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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