Re: VFS and Ext2/3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tyler wrote:
kewlemer a écrit :

On the other hand, when I got into understanding Ext2/3, I saw that
this file system also had Superblocks organized as Block groups and
other data structures that were similar to VFS's. Further, it also has
superblock operations, inode operations among others that is so
similar to VFS operations [example :- just like VFS' ulink()
operation, Ext2 has ext2_ulink()].

VFS is a common model for all the different file systems (Ext2,vfat,nfs...). All the file systems (if the file system is good) manage the same objects (superblock,inode...) like you said. That's why the VFS can implement some generic method like the open,close...
But when you use the open function, you have to access data on a physical media, which is formatted into ext2 or vfat or ...
And the data are organized differently if it's a vfat or an ext2 fs.
So the VFS layer will call low level functions to manage the data for the specific file system.
This is done by pointers function.

Thanks for the note. Yes, now I understand that the VFS' functionality is kept generic by using pointers to functions(that get mapped to the right Ext2/3's methods).


Please let me know if my understanding of the interaction between VFS data structures and Ext2/3's data structures is right- _only_ the VFS' methods(which get mapped to Ext2/3 specific methods) update the VFS' data structures. Ext2/3's data structures are updated _only_ by its own methods. Right? [like a OO approach]

If this is right, does it mean that Ext2/3 does not touch any VFS data structures like s_blocksize and s_file and the VFS is solely responsible for its data structures?

Excuse me if my question sounds trivial. But I am trying to get my understanding right.

Thanks!
KM




-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux