Page 1 of 2

Alien Filesystem

Posted: Wed Jul 21, 2010 5:42 am
by gmoney

Code: Select all

Alien FS - v1.0 [small media]

Disk Layout
[Boot Sector]
[infonode]
[Block Map]
[Master inode list]
[data and metadata]
[Backup MIL]

Boot Sector

0x00	Magic Long
0x0A	Total Sectors LBA 28bit
0x0E	info-Node Location Long
0x 	B info-Node Location Long
	Bytes Per Sectors [Default 512 Bytes]
Total 22 Bytes


Infomation Node
Disk name	16 char
Disk comment	32 char
Disk attrib	Long
inode_list blocks[bps\4 - 20] Long
inode_list pointer Long [just incase we need more blocks for the inode list]
inode_counter Long [to keep up with how many inodes we have and not to reuse any inode]
reseved [6] Long
Total BPS

Inode List Entry
name char 16
inode_num  Long
Parent inode_num Long
attrib Long
Created Timestamp Long
Modified Timestamp Long
Size Long
Block_map Long
resevered 20 char
total 64 bytes

invalid character for name entry ~, / , \, and ^.

~ is used for a deleted inode but the data isn't deleted yet sort of like a resevered status for the file 
/ is used as a directory so we dont name anything that so we dont confuse our operation system
\ same as above
^ is used to identify that inode entry is used as a long file name extention


Long File name Support
If Inode #3 has a long name to achive that you must do the following;
caculate how long the name is the max is 126
add null to any unused char
add the long name attribute to the inode
insert long name entry right after the inode 

#if you only need one LFN Inode then only use one

...
[Inode #3]
[LFN Inode #3]
[LFN Inode #3]
[Inode #4]
...

Long File name Entry
special character "^"
name char 63

File - Folder inodes 
if inode attribute says the inode is a folder then load the block map block and thats the inode list for that folder.


Attribute
0 filetype
File, Folder
Group
1 read
2 write
3 execute
Owner
4 read
5 write
6 execute
Other
7 read
8 write
9 execute
10 _is_hidden?
11 _is_LFN_enable?
12 -31 reserverd

Timestamp
day 1byte
month 1byte
year 2bytes [year since 1987]

Disk Block Map

0xFF = Bad Block
0x00 = Free Block
0xA0 = Used Block
0x01 = Unused Block [was used but not any more]
0xA1 = Reserved Block

If a disk has 1440 block then the block map uses 1440 bytes so it uses 2.81 or 3 block [512 bps]
the Block map is used to keep up with free, used and bad block.

Inode Block Map
Map[Bps/4 - 1] Long
Next Long

Sorry i know its kind of unorganized i plan on doing that later

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 5:44 am
by gmoney
This is just a ruff draft of a filesystem im developing. any idea on how to make it better or any comment are welcomed

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 6:12 am
by Candy
What's the reason you're making a file system? Can you list a combination of things that no current filesystem can do, that yours can?

That'll allow us to look at your filesystem with an idea what you're trying to accomplish with it and give more useful feedback.

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 6:33 am
by Solar
What I see here is a (very) rough draft of a technical design.

What I don't see is a functional specification.

Without step #1, step #2 cannot be judged.

For what kind of "small media" is this? ("Small" can be a 1.4 MByte disk or a <8 GByte hard drive or a <128 GByte hard drive.)

What should it be capable of doing, what is out of scope? (Example: I don't see provisions for journaling. Is that an oversight or a design decision? I cannot tell.)

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 6:42 am
by Kevin
I don't even see support for directories. There are some characters reserver for directories, but how do they actually work? Is the complete path saved in the file name in an "inode" (it's really more a mix of an inode and a directory entry).

And depending on the magic, the boot sector might not be able to boot all that well because there's metadata when there should be code.

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 6:59 am
by gmoney
...

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 7:02 am
by gmoney
Candy wrote:What's the reason you're making a file system? Can you list a combination of things that no current filesystem can do, that yours can?

That'll allow us to look at your filesystem with an idea what you're trying to accomplish with it and give more useful feedback.
this filesystem is just another filesystem that hobbyist can use instead of worrying about big brother "Microsoft"

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 7:04 am
by gmoney
Solar wrote:What I see here is a (very) rough draft of a technical design.

What I don't see is a functional specification.

Without step #1, step #2 cannot be judged.

For what kind of "small media" is this? ("Small" can be a 1.4 MByte disk or a <8 GByte hard drive or a <128 GByte hard drive.)

What should it be capable of doing, what is out of scope? (Example: I don't see provisions for journaling. Is that an oversight or a design decision? I cannot tell.)
i will post the fuctional specs later on today and when i say small media im mean 2^32. and no i didnt forget about journaling i just wanted to keep it simple for now and add it later.

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 7:11 am
by gmoney
Kevin wrote:I don't even see support for directories. There are some characters reserver for directories, but how do they actually work? Is the complete path saved in the file name in an "inode" (it's really more a mix of an inode and a directory entry).

And depending on the magic, the boot sector might not be able to boot all that well because there's metadata when there should be code.
Directories work like this;

Inode 3 is a file-folder so the attribute is set that is a file-folder
every inode entry has a block map pointer.
the vfs should load inode 3 block map pointer and treat the data like it would the master inode list. in lame terms the block map data is just another inode list when it comes to file-folder take a look below so you can under stand

Inode #0 [ Inode #1 - File ]
Inode #0 [ Inode #2 - File ]
Inode #0 [ Inode #3 -File-Folder ]
Inode #0 [ Inode # 3 [ ... ] ]
Inode #0 [ Inode # 3 [ Inode #45 ] ]
Inode #0 [ Inode # 3 [ inode #47 ] ]
Inode #0 [ Inode # 3 [ .... ] ]
Inode #0 [ Inode #6 ]
...

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 7:26 am
by Kevin
I see. You really shouldn't call these things inodes then. What they really are is directory entries (and in your current design FAT-like entries which describe everything a file consists of - have you considered that you can't do hard links this way?)

And why do you special-case the root directory? You could give it a single inode like every other directory, and reference this inode from the information block or what your superblock was called again.

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 8:21 am
by Solar
1) Adding features later on is P-A-I-N. The only people capable of pulling it off with any semblance of painlessness are veteran software designers.

2) People who want a file system without worrying about Microsoft can chose between ext2, ext3, ext4, SFS, various other OpenSource filesystems, or circumventing FAT patents using a little trick.

So, please, do yourself a favour and before setting out to design another file system, make sure you've got a list of which other file systems you have studied, and what you want to do different, to make sure you're not falling for a case of Not-Invented-Here syndrome.

(Same goes for your OS project.)

It is acceptable to say "I just want to do it for the fun", but you'd still need a functional spec before starting with the technical design (or, actually, asking others for their opinion).

Re: Alien Filesystem

Posted: Wed Jul 21, 2010 8:52 pm
by gmoney
Solar wrote:1) Adding features later on is P-A-I-N. The only people capable of pulling it off with any semblance of painlessness are veteran software designers.

2) People who want a file system without worrying about Microsoft can chose between ext2, ext3, ext4, SFS, various other OpenSource filesystems, or circumventing FAT patents using a little trick.

So, please, do yourself a favour and before setting out to design another file system, make sure you've got a list of which other file systems you have studied, and what you want to do different, to make sure you're not falling for a case of Not-Invented-Here syndrome.

(Same goes for your OS project.)

It is acceptable to say "I just want to do it for the fun", but you'd still need a functional spec before starting with the technical design (or, actually, asking others for their opinion).
if you read the above post its just a rough draft and i honestly wanted to see what people would think of it because i plan on supporting it in my own hobby os. an yes i have read the ext2, 3, and 4 along with amiga ofs, SFS, Fat12/16/32. the purpose of this post is to see what the os community thought about it and if they thought of adding something like functions or doing the layout a different way. the alien filesystem is something, when i get the draft complete, that i can say i did this and other people around the world could use this if they wanted to. it not just for fun to me this is serious. and yes i know that adding features later on is painful and i want it to be painful that the way i learn. thank you for your input solor :lol: =D>

Re: Alien Filesystem

Posted: Thu Jul 22, 2010 12:46 am
by Solar
gmoney wrote:if you read the above post its just a rough draft and i honestly wanted to see what people would think of it because i plan on supporting it in my own hobby os. [...] the purpose of this post is to see what the os community thought about it and if they thought of adding something like functions or doing the layout a different way.
*sigh*

To add functions we'd have to know what functions you already thought of. Being able to somehow reverse-engineering them from your technical layout doesn't count.

To judge whether your layout is appropriate for what you're planning to achieve, we'd have to know what you're planning to achieve.

Documentation of technical layout, by itself, is pretty worthless. Having to figure out feature set and capabilities from nothing more than a technical layout is a maintenance coder's regular nightmare.

Re: Alien Filesystem

Posted: Thu Jul 22, 2010 2:32 am
by Candy
Please just answer this simple question:

As an OS developer, why would I choose your filesystem over Ext2?

Re: Alien Filesystem

Posted: Thu Jul 29, 2010 11:39 am
by gmoney
i actually have support for ext2, sfs, and vfat. but like any os i would like a filesystem that complements my os. like linux-ext2, 3 and 4 or windows and fat12/16/32 and ntfs or even macintosh and hpfs (not sure if thats what its called). and to me its a learning process that will help me in the future.