From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796181339; b=DsbchB8XKvMLyf7UwGDKaxIfaFTuirLwR9wuqufbydR9LX6JGri0R7rZANhjllxWXLJ5 vAHsbCLHWbACmpybDX4gfJA2K4Zm1+1GnKS57xQ4WbhukFBis7A5Ogs8oTBgink+9vmqS bPJ1xvyu1why7PJuWmsh+O13sp0kMsXEa3+qsshc6X2ylBkG+75lvnC+sGtaHMyymE1DR D+JDynOidle3C90QIv+TUURa+Prk8ABqHAFSA9NtrV1go/5q/krYGtJRfFTRSwbgJ1P92 OG/4WQFiBbYLs5ag/gT3CkPLTGF1mzSiddtD1XdIFxFPsVmjfgl/edGJmZgAfbnnX5g== 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-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=zCrgtY4agTS1vDtM5Kk79dcxNUq9SZUhiLlGeOog1Wu0MnBsXYZh9M2QviuOhOnjYDUD GMVbbyJqS7KbbajGMlf7MLBugPque5XMef+nMQLpqOMKkS0jo8j9GbfK9kUjCFtfej6YO 1t2ZcyDLzE3+DhdJa7e0qrLw6HnHdWeslgDDqvy8td3Z62jkwi4B8un4yLg6nMV0EMk+R KISAkXmCYZDGlR+UEoy3bw/B2xZEyDnsV0nzMiZtcgIGc1/TVvuSMi6i99mbFFoHb9YCs XPcu95zFLYw/SMBjFGq2+xZkBoHG39nEttgbUKyz8PL4X+7gnI2uNN0I3o1RsnAviOw== 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.45 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 13E17606A32D for ; Wed, 2 Dec 2026 03:15:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 13E17606A32D 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-f45.google.com with SMTP id ffacd0b85a97d-4aa5833c263so11963684f8f.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=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=PvmWLFxONjJk3sjWo0tkhsnvch2w1pF2V3FFGlROIFSoVA5TC3rQwTr75OoqVcEk// VJv8AAtKdcnqBxdjOAFHwaMa6NTTIsgc/ZbDGEuJTTOXkOXl39xovPPAA9F8RexkeXqZ IBQANsCVDGAYftvWp+kF4FuT6Ec1KjnJZbs6qsGFczs7ebQN0SEUeUP87ce15lZubi1G BoSRHkcyVi9Pqsyy1cAfax4f5azv/P8bhggaQA2HDQ8GgFX33YOcDA35EKKHrjzAS5ni jb+lKXEhb4/ROiyG7/veY6EoIXp7Dd+g44OIaE8isoQ+3Li2xFuz41TWCcJ8D1fUW9D1 M+5g== X-Gm-Message-State: APuU4Z/v4nOqfDlh3wBOELN3Wbvvpg5Yf7ZWLaCacSEF9S/ifhDzGywJ /PU0T6ISgP5ahOmYatVv3qhzLAiWDAFqfmbuW9w3c8jm94yOzrx6n/f4NPUezQPju8Ne2YnT X-Gm-Gg: AZFdTZfrhUsqzD3SSuHf/G+bB1JhDrBX5ccw6s7i7rJK83lx1UXnoVFLKT1m/TvEA51 S8rQH6aUzkUMt33hl8M1Fn0WpiPoaKipU677kCFhPkSkf1EaHc1cSPjfmDPvxqNUNb0mtMuTwQY 4V8jGQI1gSY8kdiUulqwK3TpGcxfG/I+ayMTqRNNW1MKPYDPjv9H3BDockS37Zlx9FiCzlM5AWm Zlz0U1H0RIcAlFeyV2wt0+lPJWAOIo2qtz1tRPjBg2xrViKG0O9o0r/y9nynUauEVf2XYUzKH86 PMyzZ0w5+oOzQJ++5NhE/AT+XTdOx1rH2ssfZvGamc3fMFynFqvqJXy6Hv4b2d5AiHEEYIajKMq Liy4GRCRNEZxWvEiFHwirRcGVp4nLI3YR3eDmTOxCIQAcjCdGfbJ6KvrWOJ330a34Cqruvtbo6i 8/cH055pL03So/DQAWmzVIr75AQfv/ADbe82iYHS1f+K8uDsmtZKPlO/m14KKL41o6S4q+kjleM RFxknwdmpBvAxf1FoV1KiHbOv7+2qZOJMp2EPOlsYBY5Oau84TX2uvk4cWyNhofERrSif/4VwyH hiRTlB4OI0TVWd2il6DMOYqN7fD0MO/68qvX3w== 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-kernel@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