Implementing SFS
Posted: Mon Jul 30, 2018 10:11 am
Hi everyone!
I've been reading up about filesystems and trying to decide which one to implement in my operating system, and I've decided to go with SFS. I've never written a filesystem before, so any help will be greatly appreciated!
The following is what I understand from the SFS wiki page (key areas):
- the super-block contains information about what filesystem is contained within the current partition and contains information relating
to the size of each area
- the data area grows as files (data) are added to the filesystem
- the index area contains information about the stored files (filename, extension, date created etc)
Is this correct? Please correct me if I'm wrong.
As for the block size, do I choose my own size? Would 4KB be a good block size?
For the magic number, can this be placed anywhere inside the bootloader (I'm using GRUB and multiboot). Or do I need to place it at a specific offset? If so, how do I specify the offset?
And for the checksum, how would I go about calculating that?
PS: I do not yet have a disk driver, so I am not looking to store the files on disk, but rather in memory.
If there's anything else I need to know about writing a filesystem, please let me know! Thanks!
I've been reading up about filesystems and trying to decide which one to implement in my operating system, and I've decided to go with SFS. I've never written a filesystem before, so any help will be greatly appreciated!
The following is what I understand from the SFS wiki page (key areas):
- the super-block contains information about what filesystem is contained within the current partition and contains information relating
to the size of each area
- the data area grows as files (data) are added to the filesystem
- the index area contains information about the stored files (filename, extension, date created etc)
Is this correct? Please correct me if I'm wrong.
As for the block size, do I choose my own size? Would 4KB be a good block size?
For the magic number, can this be placed anywhere inside the bootloader (I'm using GRUB and multiboot). Or do I need to place it at a specific offset? If so, how do I specify the offset?
And for the checksum, how would I go about calculating that?
PS: I do not yet have a disk driver, so I am not looking to store the files on disk, but rather in memory.
If there's anything else I need to know about writing a filesystem, please let me know! Thanks!