Page 1 of 1

Is this a good filesystem design

Posted: Wed Mar 15, 2006 12:00 am
by earlz
This is a new file system i have been deisgning(still working on RW to and from disks so can't implement yet)

This is still missing some things but if anyone could tell me anything wrong or something that could be changed to make better could you tell me

this is my pasted design document


PCFS
Portable Custom File System

as far as i know this is the only filesystem that lets you pick things like name size

starting at 2nd sector so that bootsector making is easy

|=byte seperator
s=string
b=byte
w=word
d=dword

|s;PCFS|Float; version|b; name size|b;Type of storage device|b;the rest is for attributes

floppy disk attributes
|w;heads|w;tracks|w;sectors|b;sector size in multiples of 128|b;address width in bytes(2=32 megabytes max in 512 byte sectors


next sector:
this sector is free sector table
its basically just a whole sector of nothing but a bitmap tell which sectors are free

this can allocate more than 1 sector in large storage devices


next sector:
This sector actually starts the non header crap
this is the name table

this is the entry template
|s;filename depends on name size|depends on address width;sector number(linear)| -varies default: filename size:32 address width:2
|b;mode|D -probably;file creation date|D;Last file edit date|40 bits;file size| -dont 14 bytes -by default 48byte overhead



for directories, they have their own name table and is exactly the same entry







mode byte:
0:empty or not, 1 for not
1:directory or file
2:read only
3:system
4:hidden
5:ready to be archived
6:no use yet
7:no use yet



date dword:
0-5:day
6-9:month
10-16:year -assumes it year 2000 and that this won't be around in 2065
17-23:minute_time -no seconds or i would have to change too many things
24-29:hour_time -its 24 hour, so people using 12 hour time frame need to convert this
30-31:not used and only kept so it would be symetrical


notes:

idea1:
maybe have a name table sector
would probably be too much overhead though

another idea:
have the name in the first sector of the file therefor having a size only limited by the OS -NO!! then when you want to load the file name list for browsing you would have to load many sectors

Re: Is this a good filesystem design

Posted: Fri Mar 17, 2006 12:00 am
by Phibred
Have you thought about making an extension table for larger devices? So like each entery in this table could point to multiple of your headers? I was just working on my memory paging management for my OS and I think I will be moving to I/O really soon. But if the only things you want to target for this is floppy disks, my idea is probably overkill.

Also another good idea is to have a trace byte/word so your OS can detect what file system is currently running, just in case one day you want to support FAT for your floppies [makes life from Windows a lot easier].

Good luck, I can't wait to see what you will come up with :)

Re: Is this a good filesystem design

Posted: Fri Mar 17, 2006 12:00 am
by earlz
the string PCFS in the first five bytes of the second sector tells you it is PCFS
b;Type of storage device|b;the rest is for attributes

floppy disk attributes
|w;heads|w;tracks|w;sectors|b;sector size in multiples of 128|b;address width in bytes(2=32 megabytes max in 512 byte sectors
its not jsut for floppy, it tells what kindof storage device it is and then the rest of the bytes IN THE SECTOR is for attributes to that kindof device
i just didn't think of anything else but a floppy disk when i wrote this but yea

for example lets say 0 was for floppy and 1 was for HD
after the device type byte the rest of the bytes in the sector would be for attributes now if it was 0(floppy) then it would have the floppy disk attribute header and if it was an HD it would have the harddrive attribute header


but yes it is a big target for floppies considering fat is patented now even though i want to support any other kindof device also
if i had made it just for floppies i would have used fixed values for alot of stuff