[CVALE] How do you design a file system?
Landon Blake
lblake at ksninc.com
Tue May 8 14:33:21 PDT 2007
Wonderful information Steve. Thank you so much for your help.
(Especially for the list of questions.)
You wrote: " A very good book, although
doesn't cover filestystems, is Jonathan Corbet "Linux Device Drivers"
I have this book. I will look at it tonight when I get home.
You wrote: "Is this that Bach book?"
Yes it is.
I have these Linux programming books. Are they high-level, or low-level?
Linux Programming By Example
http://www.phptr.com/bookstore/product.asp?isbn=0131429647&rl=1
Linux Programming By Example
http://www.amazon.com/Linux-Programming-Example-Kurt-Wall/dp/0789722151/
ref=sr_1_23/103-9425652-3938219?ie=UTF8&s=books&qid=1178659986&sr=1-23
Landon
-----Original Message-----
From: cvale-bounces at lists.fire2wire.com
[mailto:cvale-bounces at lists.fire2wire.com] On Behalf Of Steve Bibayoff
Sent: Tuesday, May 08, 2007 2:20 PM
To: cvale at cvale.org
Subject: Re: [CVALE] How do you design a file system?
Hello,
On 5/8/07, Landon Blake <lblake at ksninc.com> wrote:
> This is the story of my life. :]
>
> But you have to start somewhere...
Yea, but writing a filesystem is not one of the first things you want
to start when looking at OS writing. A very good book, although
doesn't cover filestystems, is Jonathan Corbet "Linux Device Drivers":
http://www.oreilly.com/catalog/linuxdrive3/book/index.csp
Has very good examples(from beginner to advance) on a wide range of
subjects.
> Steve wrote: "There's also a few good books on filesystem design.
> ATTOMH, I can't thing of what they are right now, maybe someone else
> could.But for OS desing, I would highly recomend going through the
> Richard Stevens UNIX series of books, plus also books by Tanenbaum and
> Kirk McKusick. One last book is "UNIX Internals" by Vahalia is very
good
> theory book."
>
> I have a couple of these books. They include "Computer Organization
and
> Design"
Not familar w/ this book.
> ... and "The Design of the Unix Operating System".
Is this that Bach book? If it is, it's OK, just very dated (IIRC > 20
years old) and very specific to the Unix System V. But it still is a
good source of general knowledge.
> ... I also have at
> least two or three books on Linux programming.
Most of these books are userspace/desktop orientated and would not
help at all w/ any lower level Linux kernel stuff.
> Perhaps I need to start with the books on basic Linux programming. My
> interest in file systems may be too narrow or specific for my limited
> knowledge.
If you are really interested in Filesystem, I would first you try to
answer these questions:
1) What is a filesystem(in general terms)?
2) What is an inode?
3) Do all filesystems have inodes?
4) Are inodes created when the filesystem is created? or on the fly?
5) What is a directory?
6) What is a file?
7) How is a directory different/same as a file?
8) What is the difference between a soft link and a hard link?
9) How does the OS know where a file is located on the disk?
10) What happens when you delete a file? Directory? What is unlink?
11) What happens when you "mount" a filesystem? "umount" it?
I believe if you could answer these questions, you would be on your
way to understanding how a filesystems works.
Also, I again would say take a look at Fuse:
http://fuse.sourceforge.net/
There appears to be close to 100 different filesystems written to use
it:
http://fuse.sourceforge.net/wiki/index.php/FileSystems
Again, there is a good book on filesystem theory and design, but I
can't remember it's name right now. It's ~10 years old, but goes from
general theory(would answer all of the questions I posed), to very
specific examples and problems(yes, this book is a text book). If I
remember the name, I'll let you know. I have this book, just not close
to be at the moment( ~300 mile away).
Hopefully this is enough to get you started,
Steve
_______________________________________________
cvale mailing list
cvale at lists.fire2wire.com
http://lists.fire2wire.com/mailman/listinfo.cgi/cvale
Warning:
Information provided via electronic media is not guaranteed against defects including translation and transmission errors. If the reader is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this information in error, please notify the sender immediately.
More information about the cvale
mailing list