Hello,<br><br>I think you are looking for following:<br><br>fs/ext2/super.c:<br><br>init_ext2_fs()-> register_filesystem(&ext2_fs_type)-> ext2_get_sb()->ext2_fill_super()<br><br>For every file system in linux kernel, first it register itself with register_filesystem().<br>
Here this call is called when ext2 module is loaded. Then when file system is mount <br>it will call ext2_fill_super() which will read the on disk super block and load it into memory.<br><br>The on disk super block is written when user format the device with given file system.<br>
<br>I hope that will help.<br><br>- Rahul<br><br><div class="gmail_quote">On Fri, Jan 7, 2011 at 9:40 PM, Fu Kai <span dir="ltr"><<a href="mailto:kapenware@gmail.com">kapenware@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi folks,<br>I'm looking the source code about linux file system recently. I have scanned over ext2, <br>and now I'm very curious about how does the kernel setup the ext2 up, but I couldn't locate <br>the corresponding code. Could anybody give any advice for me?<br>
<br>Thanks,<br>owr<br>
<br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br>