Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-21-2012, 11:25 AM   #1
LQ Newbie
Registered: Jan 2012
Posts: 16

Rep: Reputation: Disabled
how VFS works ?


How does VFS gets to know to which file-system it has received the read() or write() call ?

We know that VFS trasnfers the call in File-system specific format,but how it will get to know whether it has to transfer the call to ext2 or ntfs ?

Kindly help
Thanks in advance
Old 08-22-2012, 11:34 AM   #2
Registered: Nov 2011
Location: AccountKiller
Distribution: AccountKiller
Posts: 89

Rep: Reputation: 39
I am not an expert on kernel internals but I think when the partition is mounted the file system type is remembered, so the when a read() or write() call is issued, the kernel starts at the end of the filename and strips it until it finds a mountpoint
(/home/foo/bar/baz/qux.c is in
/home/foo/bar/baz, not a mounted fs,
/home/foo/bar, not a mounted fs,
/home/foo, not a mounted fs,
/home, hey that's a mount point for a partition)
,then it looks up the partition or loopback connected to that mount point, looks up the filesystem and issues the right command.

You might be interested in this and this.
IBM has a lot of good articles on the structure of Linux in its 'Anatomy of' series, so try looking there and in Google before asking.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sed: alone [ /pattern/!d ] works; alone [ s ] works; together =don't work klenot Programming 7 10-23-2010 09:45 AM
Strangest FTP error on RHEL5. gFTP works. RHEL4 works too. GuitsBoy Linux - Software 1 04-10-2008 08:29 AM
Mounting works, playing music works, reading tags doesn't Celettu Linux - Newbie 7 08-23-2006 12:27 PM
DNS look up works, ping only works for some sites any ideas? Mantrout Linux - Wireless Networking 3 01-29-2006 11:59 AM
XAWTV works, videodog works, motion works but how to code my own? rylan76 Linux - Hardware 0 01-06-2006 06:30 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration