# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/btrfs-progs/hotfix-pagesize.patch # Copyright (C) 2024 - 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Fix mkfs.btrfs to default to the arch default PAGE_SIZE, e.g. 8/16/64k for most RISC systems. Until recently the kernel did not support other sector sizes, and even now it is still "experimental". --- btrfs-progs-v6.10.1/mkfs/main.c.vanilla 2024-09-05 16:38:45.306000000 +0100 +++ btrfs-progs-v6.10.1/mkfs/main.c 2024-09-05 16:43:07.802000000 +0100 @@ -1245,7 +1246,7 @@ } if (!sectorsize) - sectorsize = (u32)SZ_4K; + sectorsize = (u32)getpagesize(); if (btrfs_check_sectorsize(sectorsize)) { ret = 1; goto error;