mkfs-util: Set sector size for btrfs as well
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 29 Jun 2024 13:27:02 +0000 (15:27 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 5 Jul 2024 18:00:04 +0000 (20:00 +0200)
commit24987eb3cc175dd4e5cfaab5abe6da02b64104bc
tree6edcf4cd8051324fd58ce2833301665735effefe
parente34f436433cfce10d01d31569f74f0ad96d5a938
mkfs-util: Set sector size for btrfs as well

btrfs used to default the sector size to the page size and didn't
support anything else. Since 6.7, it defaults to 4K and using 4K
makes the filesystem compatible with all page sizes. So let's make
sure we use minimum 4K as well (lower causes failures on systems with
a 4K page size) but still allow larger sector sizes if specified by
the user.

(cherry picked from commit 03c9e88fb7eb8973477c33aa63dc6bcf0cab52c9)
src/shared/mkfs-util.c