Re: Difference between various superblock methods

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

 





On Sun, Apr 18, 2010 at 10:33 PM, Himanshu Aggarwal <lkml.himanshu@xxxxxxxxx> 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

[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