VFS Article
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
VFS Article
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.
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
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
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
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 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)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 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.
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
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.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?
A node is a mountpoint if the following is true:
Code: Select all
(node->flags & FS_DIRECTORY) && (node->flags & FS_MOUNTPOINT)
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).
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact: