[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] (fwd) Revisited: HDDRIVER, FAT32, MiNT, FAT too small



Hello Jo Even!

When creating a FAT32 partition of 4095 MB HDDRUTIL allocates 8386528
sectors of 512 bytes for the FATs and the actual data area. 8174 sectors
are allocated for each FAT, which means that 8386528-2*8174=8370180
sectors remain for the actual data. There are 8 sectors per cluster,
which means that there are 8386528/8=1046272 data clusters. For each of
these 1046272 clusters a 32 bit FAT entry is required, which means that
1046272*4=4185088 bytes are needed per FAT. This is exactly what 8174
sectors per FAT amount to: 8174*512=4185088.

This calculation shows that the number of FAT sectors allocated by
HDDRUTIL is exactly the number of sectors needed.
If my calculation is right MiNT is wrong and should be fixed. If my
calculation is wrong please point out the error so that I can fix my code.

What about the two empty (unused) entries at the start of each FAT table?


Regards,
Frank

--
ATARI FALCON 060 // MILAN 060
-----------------------------
http://sparemint.org/
e-Mail: fnaumann@boerde.de