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