Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 07-24-2008, 08:12 AM   #1
LQ Newbie
Registered: Jul 2008
Posts: 1

Rep: Reputation: 0
Difference between inode and vnode?

hi this is my first post in this forum. I would like to ask about the difference between inode and vnode. I searched on the internet and borrowed some books from the library, but I didn't quite understand it I thought maybe you can help me. Any way this is what I understood.

Tthe difference between a vnode and an inode is where it's located and when it's valid. Inodes are located on disk, vnodes in memory and inodes are always valid because they contain information that is always needed such as ownership and protection but Vnodes are located in the only exist when a file is opened.

Can someone tell me am I right or not?

In wikipedia, it says "The kernel's in-memory representation of this data is called struct inode in Linux. Systems derived from BSD use the term vnode, with the v of vnode referring to the kernel's virtual file system layer."

Are they the same things? and do they the same job?Is it a just name difference between linux and bsd OS, in linux inode in freebsd vnode?

I will really appreciate if someone can help me. Thanks.
Old 07-24-2008, 08:58 AM   #2
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181
The vnode structure ("virtual node") is an essential part of the virtual file system (VFS) support in Linux.

A definitive paper entitled "Vnodes: An Architecture for Multiple File System Types in Sun Unix," by S. R. Kleiman, can be found (says Google) at , which reads in part:
The file system dependent/independent split was done just above the UNIX-kernel inode layer. This was an obvious choice, as the inode was the main object for file manipulation in the kernel. [...] The file system dependent inode was renamed vnode (virtual node). All file manipulation is done with a vnode object. Similarly, file systems are manipulated through an object called a vfs (virtual file system). The vfs is the analog to the old mount-table entry. The file system independent layer is generally referred to a the vnode layer.
In the original Unix file systems, the "actual" representation of a file (or directory or whatever) was called "an inode," and it was referenced by number. Directory entries simply contained a list of file-names and corresponding inode-numbers. This scheme exists today.

The VFS system allows filesystems of any type ... both disk-based file systems and network ones ... to be used in Unix/Linux, while retaining the essential concept of "an inode," now called "vnode." This arrangement preserves a nearly one-to-one correspondence between "the old way" and "the new way." The logical data structure, as seen and manipulated by Unix programs, exists much as it was before, and thereby insulates programs from the (possibly very enormous) actual physical differences. In typical Unix fashion, the solution is "elegant."

Last edited by sundialsvcs; 07-24-2008 at 09:00 AM.


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
shell script to find the difference betwwn two file and place the difference to other kittunot4u Linux - General 3 07-19-2010 04:26 AM
what is inode. shellarchive Red Hat 2 01-01-2008 11:12 PM
inode ahmed gamal Slackware 2 04-02-2006 08:34 AM
inode muthiahm Linux - Newbie 2 06-11-2004 04:00 PM
about inode eshwar_ind Programming 3 04-24-2004 02:39 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:31 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