LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   filesystems - how to code (https://www.linuxquestions.org/questions/linux-general-1/filesystems-how-to-code-647868/)

terfy 06-08-2008 05:03 PM

filesystems - how to code
 
Hi guys.'

I know this maybe is a off topic question, but I did Google a lot without any luck.

So I hope you guys can help me.

I want to find information (a lot) about how to create a file system.. I mean.. how to code one, from the bottom..
Like, how ext2 etc etc was made.. are there any schemes I can read about it ??

What does it need.. does it need knowledge of C programming ? Maybe assembler ?? I don't know.

Please help me. find me information about it. I give up googling.

Terfy

pixellany 06-08-2008 05:19 PM

I would go to the project sites and study the source code. Here's a starting point for ext2:
http://www.google.com/search?q=ext2+...L_enUS177US235

I think that ext2 is typically built into the kernel, so looking at the kernel source would be another good thing to do.

terfy 06-08-2008 05:27 PM

ok, thanks..

but are there any guides on the net somewhere I can read about it in general and not only ext2-based information ??

Terfy

jailbait 06-08-2008 05:39 PM

Quote:

Originally Posted by terfy (Post 3178617)

I want to find information (a lot) about how to create a file system.. I mean.. how to code one, from the bottom..
Like, how ext2 etc etc was made.. are there any schemes I can read about it ??

What does it need.. does it need knowledge of C programming ? Maybe assembler ??

If you want to create a file system from the bottom then the design is a much bigger consideration than the coding. The first design consideration is what features you want to include. You can get ideas from existing file systems' features without reading the code. Here is a description of reiserfs features:

http://www.linuxjournal.com/article/4466

Here is an outline description of a ZFS description with an emphasis on performance:

http://64.233.169.104/linux?q=cache:...70102_v0_4.pdf

Here is a discussion of new features to be included in ext4.

http://www.ussg.iu.edu/hypermail/lin...07.0/0967.html

You also need to know how hardware works at a more basic level than your typical application programming. Here is a very incomplete set of disk descriptions:

http://www.faqs.org/docs/linux_admin/x1001.html

http://www.lydgate.org.uk/linux/hdd.html

Then you work out the design as to how your new file system software is to provide your feature set by using the available hardware capabilities.

Once you get down to coding the file system then you can use either assembly or C. Assembly is faster and it used to be that all OSs including file systems were written in assembly. But assembly is very much machine dependent and file systems written in assembly are not portable. File systems written in C are much more portable so these days almost everybody writes OS components such as file systems in C as much as possible and accepts the performance hit from using a higher level language.

------------------
Steve Stites

pixellany 06-08-2008 10:30 PM

Quote:

Originally Posted by terfy (Post 3178629)
ok, thanks..

but are there any guides on the net somewhere I can read about it in general and not only ext2-based information ??

Terfy

Allow me to introduce you to Google:
http://www.google.com/search?q=linux...L_enUS177US235


All times are GMT -5. The time now is 12:16 PM.