Determining slot type

  1. Check DIR_Name[0] / LDIR_Ord
    if 0 (1/256) : See Empty slot
    else (255/256) goto 2
  2. Check (L)DIR_Attr
    if invalid (1/4) see Invalid attributes
    if unknown (7/32) see Unknown attributes
    if ATTR_LONG_NAME (1/64) see Long names (long entry)
    if ATTR_VOLUME_ID (1/64) see Volume-ID (short entry)
    if ATTR_DIRECTORY (1/4) see Directories (short entry)
    else (1/4) goto 3
  3. Check DIR_Name[0] / DIR_Attr / DIR_FstClusLO
    if 0xe5 / 0x00 / 0x0000 (1/255*1/64*1/65 536 = 1/1 069 547 520) see Linux-erased long name (long entry)
    else (1 069 547 519 / 1 069 547 520) see Files (short entry)

Empty slot (0.4%, 1/256)

Tot:256^31
OK :1(0.0%)
W2 :256^31-1(100%)
  • 1st char set to 0x00 is sufficient (p.23)
  • However implementations are clearing the whole slot.

Invalid attributes (24.9%, 255/1024)

Tot:255 x 64 x 256^30
Err:255 x 64 x 256^30(100%)
  • (p.33)

Unknown attributes (21.8%, 1785/8192)

Tot:255 x 56 x 256^30
W2 :255 x 56 x 256^30(100%)
  • According to (p.33), these are volume labels.
  • According to (p.22), these aren't.
According to (p.22), a label has only ATTIBUTE_VOLUME_ID set, and it is more consistent as long names aren't volume labels but also have ATTRIBUTE_VOLUME_ID set.

Long names (1.6%, 255/16384)

Tot:1.8 x 10^75
OK :4.2 x 10^66(2.3 x 10^-9)

Tot : 255*4*256^30
OK : 16 448 637 805 799 218 987 180 166 082 690 302 895 038 357 818 732 359 384 680 088 903 * 1 * 1 * 256 * 1

Volume-ID (1.6%, 255/16384)

Tot:1.8 x 10^75
OK :1.2 x 10^51(6.7 x 10^-25)

Tot : 255*4*256^30
OK : 31528019073332790943547392 * 1 * 1 * 38 139 895 010 575 468 515 643 200 * 1 * 1
Which dates / times really are defined ?

Directories (24.9%, 255/1024)

Tot:2.9 x 10^76
OK :2.1 x 10^70(7.4 x 10^-7)
W1 :5.4 x 10^72(1.9 x 10^-4)

Tot : 255*64*256^30
OK : 30 337 028 493 752 722 493 440 002 * 16 * 1 * 38 139 895 010 575 468 515 643 200 * 2^28 * 2^32
W1 : 30 337 028 493 752 722 493 440 002 * 16 * 255 * 38 139 895 010 575 468 515 643 200 * 2^28 * 2^32

Linux-erased long names (0.0%, 1/2^32)

Tot:256^28
OK :sum(i=1..13,65 534^i) x 256(0.4%)
W1 :sum(i=1..13,65 534^i) x 255 x 256(99.6%)
Err:(256^26 - sum(i=1..13,65 534^i)) x 256 x 256(0.0%)
  • Slot[0] = 0xe5 and Slot[11] = Slot[26] = Slot[27] = 0

Files (24.9%, (255*2^22-1)/2^32)

Tot:2.9 x 10^76
OK :2.1 x 10^70(7.4 x 10^-7)
W1 :5.4 x 10^72(1.9 x 10^-4)

Tot : 255 * 64 * 256^30 - 256^28
OK : 30 337 028 493 752 722 493 440 000 * 16 * 1 * 38 139 895 010 575 468 515 643 200 * 2^28 * 2^32
W1 : 30 337 028 493 752 722 493 440 000 * 16 * 255 * 38 139 895 010 575 468 515 643 200 * 2^28 * 2^32

Overall

Tot:1.2 x 10^77
OK :4.2 x 10^70(3.7 x 10^-7)
W1 :1.1 x 10^73(9.5 x 10^-5)

Tot : 256^32
1 in 10 000 random 32 bytes chunks looks like a valid fat slot. That doesn't look that good... However, keep in mind that the whole sector must be OK. And 10 000^16 = 10^64.