On Sun, Apr 18, 2010 at 10:33 PM, Himanshu Aggarwal <[email protected] > wrote:
> Hi, > > I am going through the Understanding Linux Kernel, chapter 12. > In this it describes various methods to get the superblock. These are: > > 1. get_sb_bdev() > This is called when you are looking for superblock in block device. If you look at the code it calls "open_bdev_exclusive", which opens a block device by name and set it up for use Then it calls "sget" which find or creates a superblock. 2. get_sb_nodev() > This is called when there is no block device involved. For example FUSE. It immediately calls "sget". > 3. get_sb_pseudo() > Again no block device is involved. its a common helper for pseudo-filesystems (sockfs, pipefs, bdev - stuff that will never be mountable) It immediately calls "sget". > 4. get_sb_single() > It identical to "get_sb_nodev". It is used when there can be at most one instance of the filesystem. With new mounts you use the old instance with same or additional flags. Regards, Neependra
