Page 1 of 1
VFS Article
Posted: Fri Apr 11, 2008 10:31 pm
by thepowersgang
I have just created an article on VFS. It is rather barebones but has some information. I would like it if someone would read over it and fix any errors/omissions.
Posted: Sat Apr 12, 2008 2:59 am
by AJ
Hi,
As you say, it is quite barebones but is a good start. I don't know enough background for fact checking, but a quick proof-read didn't show up any problems!
I know it's meant to be an article rather than a tutorial, but it may be useful to define how the VFS fits in with on-disk FS's and things like the device file system. I don't necessary mean code - just a diagram or something?
Cheers,
Adam
Posted: Mon Apr 14, 2008 11:04 am
by z180
I used for my VFS work a paper from Sun that tells about the VFS
from SunOS 2.0 that was later 1990 integrated into 4.3BSD-Reno
and System V 4.0 and some less known systems(uwisc 4.3 from unix archive).Also I found papers on stacking VFS on the net.
Posted: Sat Apr 19, 2008 12:08 am
by thepowersgang
Thanks AJ
I will try to get some diagrams and integrate a more thourough definition into the next version.
z180: Can you point me to those documents. The content on the current article comes from a tutorial by JamesM and my own personal experience.
EDIT:
Could someone please read JamesM's tutorial (See the bottom of the Wiki Article for link) and find out how his model defines mountpoints? I can see how they are stored but I cannot see how the flag and information are set.
Posted: Sat Apr 19, 2008 2:32 pm
by JamesM
thepowersgang wrote:Thanks AJ
I will try to get some diagrams and integrate a more thourough definition into the next version.
z180: Can you point me to those documents. The content on the current article comes from a tutorial by JamesM and my own personal experience.
EDIT:
Could someone please read JamesM's tutorial (See the bottom of the Wiki Article for link) and find out how his model defines mountpoints? I can see how they are stored but I cannot see how the flag and information are set.
I've read that tutorial. What exactly don't you see how's set? (wow that could have been phrased better but I'm pretty drunk right now)
I haven't actually covered using the VFS to mount stuff as yet (will be in a later tutorial) but the basic gist of it is that you take a directory node and add the "mountpoint" flag. This then makes the symlink pointer (pointer to another VFS node) active, which points to the root directory node of the mounted FS.
Posted: Sat Apr 19, 2008 8:49 pm
by thepowersgang
The idea I don't get is how the flag is saved, is it stored on the file system or does the VFS hack it in somehow.
From what I can see there is only one node that is permanently stored in memory: the root node. So how does the mount flag get to be persistent?
Posted: Sun Apr 20, 2008 9:05 am
by Jeko
I have a document on VFS handling. But it's pdf and I can't upload this here. I can send it to you if you want
Posted: Sun Apr 20, 2008 10:47 am
by thepowersgang
that would be quite useful, can you please send it to the address in my profile?
Posted: Sun Apr 20, 2008 1:54 pm
by JamesM
thepowersgang wrote:The idea I don't get is how the flag is saved, is it stored on the file system or does the VFS hack it in somehow.
From what I can see there is only one node that is permanently stored in memory: the root node. So how does the mount flag get to be persistent?
All nodes are stored in memory. Just the only node you have a permanent pointer to is the root node. From the root node you can traverse to any part of the VFS tree.
A node is a mountpoint if the following is true:
Code: Select all
(node->flags & FS_DIRECTORY) && (node->flags & FS_MOUNTPOINT)
And if the node is a mountpoint (if the above statement is true), the node_t* member of the node is used to find the root node of the mounted filesystem.
As for "persistent", I don't understand what you mean - do you mean persistent over reboots? In which case it doesn't, just as it doesn't on a linux or bsd system. On every reboot all filesystems are mounted again - mountpoints aren't persistent. (This is the reason for the file /etc/fstab).
Posted: Mon Apr 21, 2008 12:32 am
by thepowersgang
Thanks, I thought that the nodes were not stored in memory so that made me confused.
Posted: Mon Apr 21, 2008 8:44 am
by Jeko
thepowersgang wrote:that would be quite useful, can you please send it to the address in my profile?
Ok! No problem.
I send you also some useful links.
Posted: Tue May 20, 2008 8:56 pm
by thepowersgang
I've updated the article with a more complete and a description of a version between a 100% memory resident node model and a mount list only.
I've also fixed the artifacts in the diagram and coloured it in.
Could someone read the article and check for grammatical errors.
Posted: Tue May 20, 2008 9:41 pm
by bewing
A few small grammatical and punctuation twists, but a heck of a lot better than most of the wiki. It will do just fine.
Nice graphic!