Hey,
What are you implementing as your native file system? Are you considering designing your own?
How do various file systems track free space? The reason I ask this is because I am considering creating my own simple file system. I have looked at the docs for various file systems but don't really understand them. I know, I shouldn't be creating one if I can't understand existing ones but I want to experiment and learn a bit along the way.
Cheers.
File Systems
Re:File Systems
If you are implementing your own, take a look at this book: (free pdf)
http://www.nobius.org/~dbg/practical-fi ... design.pdf
http://www.nobius.org/~dbg/practical-fi ... design.pdf
Re:File Systems
I've chosen to implement my own. There are two approaches I'm looking into. The first is basically is a simple, linear allocation of 1k blocks. A file takes a minimum of 1k, and the maximum size will likely be a couple of megabytes.What are you implementing as your native file system? Are you considering designing your own?
The size allocations are predetermined. There are X number of 1k blocks, Y number of 2k blocks and so on. These are stored in a table taking a form like:
Code: Select all
; Header for 1k table
size dd 1024
entries dd 10
; Block 1
in_use dd ? ; 0 = no, 1 = yes
name_length dd ?
name rb 32
; Block 2
in_use dd ? ; 0 = no, 1 = yes
name_length dd ?
name rb 32
...
The second approach I'm exploring is a static array of fixed-size blocks. This would waste more space than the first option, but would be easier to implement and persistance would fit over it more easily. Likely both will eventually come into being and the users could choose which form to use...
Of course these are both rough approximations of what I want; I'm gradually refining them as time allows