this one is for clawson

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson, when a directory entry occurs at the boundary of a cluster do you split the directory between the two clusters, or move on to the next cluster and not split the entry?

Last Edited: Tue. Jul 9, 2019 - 04:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

A cluster is the minimum unit of granularity. All files and all directories start at the boundary of a cluster and are either one or more clusters long. They may not (likely do not) exactly fill the last cluster.

 

So basically I don't understand your question. If a sector is completely full and you need to add more you go back to the parent directory entry, allocate one more cluster in its FAT chain then continue to expand the directory into that new cluster. In this sense the growth of a directory is no different to the growth of a file. In fact you can think of directories simply as if they were files that just happen to contain a load of 32 byte records.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello clawson, it's me again. I'm having trouble with link clusters in the  exFAT FS.  It works with files but with directories, spanning multiple clusters fails.  I've had a look at the data on Active Disk Editor and everything is okay.  But when I test the card in windows the directory fails to list the directories in the second cluster and onwards.

 

Now, out of interest.  When I add a directory to an already full directory it marks the wrong cluster number!  It seems to mark the cluster 2 steps ahead of it.  So if the source directory was at 8 it would mark cluster 10 has being the link list in windows!

 

And before you say that it maybe something to do with root being two it's not.  I've checked that.

 

Have you any advise on how I may move forward.

 

Wm.

Last Edited: Tue. Jul 9, 2019 - 04:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It used to be the case (FAT12, FAT16) that the root directory was a special case and could only be one cluster long. As clusters were typically things like 8KB (say) and a directory entry is 32 bytes then this is why there were fixed limits on the number of files in the root (8192 / 32 = 256) or whatever but FAT32 changed this and the root is just a "file" like all other directories and files. As such it is cluster extensible so say you have 32KB clusters in FAT32 and you some to create the 1025th file in the root then it should simply go back to the FAT chain for the root "file" and allocate another cluster to it and that would allow another 1024 files to be added and so on.

 

So, no I can't think why Windows would impose any limit on reading directories UNLESS it thinks it is dealing with FAT12/FAT16 rather than FAT32 ?? (and even then I thought the limit was ONLY for the root, not for sub-dirs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Really can't see why this is not working the data in the Active Disk Editor is perfect.