# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/btrfs-progs/hotfix-pagesize.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-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;