mkfs.vfat: explain big filesystem sizes with 32 sectors/cluster, no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko committed 2026-11-12 11:11:29 +01:00
1 parent 3e4beef20c
commit 7de358fa8e
1 file changed
+5
+5
View File
@@ -396,6 +396,11 @@ int mkfs_vfat_main(int argc UNUSED_PARAM, char **argv)
sect_per_clust = 16;
if (t >= 16/4)
sect_per_clust = 32;
// with 2^32 (0x100000000) sectors and 32 sectors/cluster, there are 0x08000000 clusters
// (which fits into maximum allowed FAT32 sector number, 0x0FFFFFF7)
// and each FAT table is 512 MBytes.
// 32 sectors/cluster stops being enough only at about twice as many sectors,
// which is currently not allowed anyway (total sector count must fit into a 32 bit header field).
}
}
} else {