LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-21-2012, 12:25 PM   #1
ashish061291
LQ Newbie
 
Registered: Jan 2012
Posts: 16

Rep: Reputation: Disabled
how VFS works ?


Hi,

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, 12:34 PM   #2
mennohellinga
Member
 
Registered: Jun 2012
Location: Netherlands
Distribution: Archlinux
Posts: 72

Rep: Reputation: 38
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.
 
  


Reply


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 10:45 AM
Strangest FTP error on RHEL5. gFTP works. RHEL4 works too. GuitsBoy Linux - Software 1 04-10-2008 09:29 AM
Mounting works, playing music works, reading tags doesn't Celettu Linux - Newbie 7 08-23-2006 01:27 PM
DNS look up works, ping only works for some sites any ideas? Mantrout Linux - Wireless Networking 3 01-29-2006 12:59 PM
XAWTV works, videodog works, motion works but how to code my own? rylan76 Linux - Hardware 0 01-06-2006 07:30 AM


All times are GMT -5. The time now is 05:18 AM.

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