How does the kernel setup the file system

Rahul Deshmukh rahul.deshmukh at gmail.com
Fri Jan 7 23:12:11 EST 2011


Hello,

I think you are looking for following:

fs/ext2/super.c:

init_ext2_fs()-> register_filesystem(&ext2_fs_type)->
ext2_get_sb()->ext2_fill_super()

For every file system in linux kernel,  first it register itself with
register_filesystem().
Here this call is called when ext2  module is loaded. Then when file system
is mount
it will call ext2_fill_super() which will read the on disk super block and
load it into memory.

The on disk super block is written when user format the device with given
file system.

I hope that will help.

- Rahul

On Fri, Jan 7, 2011 at 9:40 PM, Fu Kai <kapenware at gmail.com> wrote:

> hi folks,
> I'm looking the source code about linux file system recently. I have
> scanned over ext2,
> and now I'm very curious about how does the kernel setup the ext2 up, but I
> couldn't locate
> the corresponding code. Could anybody give any advice for me?
>
> Thanks,
> owr
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110108/913c2e6c/attachment.html 


More information about the Kernelnewbies mailing list