TFS - A File System

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

TFS - A File System

Post by piranha »

I have designed a new filesystem, TFS. It is designed to be flexible, and to be implemented easily (like, very easily, I found).
It's basic workings include a variable index entry size, with slightly differing specs for each size (this allows one to create implementations very easily, as you can chose the level of complexity). Also, one of these index entry sizes (256) allows for storing file information directly inside the entry. There is no fragmentation support. Each index entry points to it's parent index entry, based on a simple static number assignment system. The first entry is 0 (root), the second is 2. This isn't based on creation order, but actual order on the disk.

This file system is loosely based upon SFS (mostly, the superblock format, and a couple other things), with permissions i got from the Ext2 entry on the wiki :wink:

This Filesystem also supports unix permissions, time stamps, user stuff, etc.

Index Entry sizes are as follows:
64 bytes - Basic file info (type, name, starting block in data area, length, and pointer to parent)
128 bytes - The above + Permissions, time, user stuff, OS ID, pointer to continuation entry (extra long file names). This entry also supports longer filenames than 64 bytes, even without a continuation.
256 bytes - Allows for everything above + storing 127 bytes of the file data in the entry.
Now, you may make the entry size above 256 (actually, the only other option is 512) and that can be used for whatever.
Less than 64 bytes entry is not supported.

If the size is 64 bytes, then files must be block aligned. If they are 128 bytes, then you can have data that says what the offset inside a block is.

Anyway, the full specification is here: http://microsea.googlecode.com/files/tfs_03.doc
Edit: Fixed a few things...lol
Please, comments? Suggestions? Criticisms?
this is my first serious attempt at a filesystem
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: TFS - A File System

Post by Troy Martin »

I like it. I think I'll use it for my kernel's ramdisk. (now I just need to figure out how to load the image...)
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: TFS - A File System

Post by VolTeK »

piranha , if this is easy like you said, i declare you a genius, i dont know if i want to use it yet, but when i have the time and the confidence, i will look to you (or the google code link you put down).

good job!
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: TFS - A File System

Post by earlz »

This is impressive. You got
[*]long file names
[*]permissions
[*]time stamps

Really that's all the features I've been looking for, along with fairly easy to implement...

hmm... Is this filesystem simple enough that you can implement a bootloader in it without having to fix the bootloader with block constants or something of your second stage loader? that would be somethign I'd really like to know..
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: TFS - A File System

Post by piranha »

I don't really know much about bootloaders, as I decided not to write one myself. So I wouldn't know...

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: TFS - A File System

Post by Combuster »

8 bits to describe rwxrwxrwx? (9 fields!)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: TFS - A File System

Post by piranha »

Combuster: Good point.

I've updated/changed the index entry specs a bit to accommodate this, now the permissions field is 2 bytes long.
--> http://microsea.googlecode.com/files/tfs_03.doc

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
AUsername
Member
Member
Posts: 54
Joined: Sun Feb 01, 2009 9:07 pm

Re: TFS - A File System

Post by AUsername »

This is actually really nice...
It's like a simpler and better version of FAT12.
PatrickV
Member
Member
Posts: 151
Joined: Sun Jul 06, 2008 7:50 pm
Location: New Zealand
Contact:

Re: TFS - A File System

Post by PatrickV »

You need to work on the MFT to make performace better
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: TFS - A File System

Post by piranha »

Interesting, but I don't want to change the specs at this point...

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
yemista
Member
Member
Posts: 299
Joined: Fri Dec 26, 2008 12:31 pm
Location: Boston
Contact:

Re: TFS - A File System

Post by yemista »

How does fragmentation increase read speed?
Kieran
Member
Member
Posts: 54
Joined: Mon Apr 11, 2005 11:00 pm

Re: TFS - A File System

Post by Kieran »

Fragmentation increases read tima as the file system driver will have to jump around to various sector locations on the disk (not in a sequential order, hence 'fragmented') to read a single file, the time penalty incurred can sometimes be negligible for small files but for big files or an app reading hundreds/thousands of file in quick succession this time penalty can be very noticable.
The extra time to read a fragmented file is the time it takes for the disk drive to seek to the various sectors/segments of the fragmented file, where as, a non-fragmented file will be one sector after another so its the minimum possible sector seek time.

Kieran
Post Reply