OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 25, 2024 5:43 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: VFS Article
PostPosted: Fri Apr 11, 2008 10:31 pm 
Offline
Member
Member
User avatar

Joined: Tue Dec 25, 2007 6:03 am
Posts: 734
Location: Perth, Western Australia
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 12, 2008 2:59 am 
Offline
Member
Member
User avatar

Joined: Sun Oct 22, 2006 7:01 am
Posts: 2646
Location: Devon, UK
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 14, 2008 11:04 am 
Offline
Member
Member

Joined: Tue Mar 04, 2008 12:32 pm
Posts: 32
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 19, 2008 12:08 am 
Offline
Member
Member
User avatar

Joined: Tue Dec 25, 2007 6:03 am
Posts: 734
Location: Perth, Western Australia
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 19, 2008 2:32 pm 
Offline
Member
Member
User avatar

Joined: Tue Jul 10, 2007 5:27 am
Posts: 2935
Location: York, United Kingdom
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.

_________________
Horizon - a framework and language for SAS-OS development
Project 'Pedigree'
Practical x86 OSDev tutorials


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 19, 2008 8:49 pm 
Offline
Member
Member
User avatar

Joined: Tue Dec 25, 2007 6:03 am
Posts: 734
Location: Perth, Western Australia
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?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 20, 2008 9:05 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 17, 2006 12:00 am
Posts: 500
Location: Napoli, Italy
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 20, 2008 10:47 am 
Offline
Member
Member
User avatar

Joined: Tue Dec 25, 2007 6:03 am
Posts: 734
Location: Perth, Western Australia
that would be quite useful, can you please send it to the address in my profile?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 20, 2008 1:54 pm 
Offline
Member
Member
User avatar

Joined: Tue Jul 10, 2007 5:27 am
Posts: 2935
Location: York, United Kingdom
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:
(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).

_________________
Horizon - a framework and language for SAS-OS development
Project 'Pedigree'
Practical x86 OSDev tutorials


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 21, 2008 12:32 am 
Offline
Member
Member
User avatar

Joined: Tue Dec 25, 2007 6:03 am
Posts: 734
Location: Perth, Western Australia
Thanks, I thought that the nodes were not stored in memory so that made me confused.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 21, 2008 8:44 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 17, 2006 12:00 am
Posts: 500
Location: Napoli, Italy
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 20, 2008 8:56 pm 
Offline
Member
Member
User avatar

Joined: Tue Dec 25, 2007 6:03 am
Posts: 734
Location: Perth, Western Australia
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 20, 2008 9:41 pm 
Offline
Member
Member
User avatar

Joined: Wed Feb 07, 2007 1:45 pm
Posts: 1401
Location: Eugene, OR, US
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! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 80 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group