Hi i try to design a small and simple filesystem.
The main things are:
1. 512 byte bootsector (not directly the filesystem, i know)
2. 0.5% of the hole disk size for a FAT (not like Microsofts):
1. table size (int value (4bytes))
2. table entries:
1. name (ends with a zero byte)
2. position of the file (int value (4bytes))
3. size of the file (int value (4bytes))
3. the rest of the disk for the files
/*I know that the limit of this system is 4GB*/
So the problem is how can i find place for new files in short time(i don't want to split them), if some files were deleted.
A new filesystem
Re:A new filesystem
Hm ...
First, implement an existing one and learn how the internals can be handled, and then maybe you are far enough and have enough knowledge to do one of your own.
Anyway, if you intend to introduce a vfs layer: this one is up to you to design.
Stay safe.
First, implement an existing one and learn how the internals can be handled, and then maybe you are far enough and have enough knowledge to do one of your own.
Anyway, if you intend to introduce a vfs layer: this one is up to you to design.
Stay safe.
Re:A new filesystem
You have a choice of either splitting files, or running out of disk space. This is the purpose of the FAT: it answers the question, "if I have cluster X, what is the number of the next cluster in the file?" When you want to grow a file, the FAT file system driver allocates a new cluster by looking for a free one in the FAT; it might not be possible to put the new cluster next to the previous one.ich_will wrote:So the problem is how can i find place for new files in short time(i don't want to split them), if some files were deleted.
Anyway, I agree with BI on this: it's best to learn about file systems by implementing an existing one. FAT is simple, but ext2 is nicer to program. There are already many, many file system types in existence and it's difficult to improve on the ones we use every day.