{"id":429,"date":"2020-08-18T19:23:47","date_gmt":"2020-08-18T20:23:47","guid":{"rendered":"http:\/\/www.linux-tutorial.info\/?page_id=77"},"modified":"2020-08-22T19:26:18","modified_gmt":"2020-08-22T20:26:18","slug":"this-is-the-page-title-toplevel-262","status":"publish","type":"page","link":"http:\/\/www.linux-tutorial.info\/?page_id=429","title":{"rendered":"Registering the File System"},"content":{"rendered":"\n<title>Registering the File Systems<\/title>\n<p>\n<img decoding=\"async\" src=\"file-systems.gif\"><br \/>\n<p>\nFigure: Registered File Systems\n<p>\nWhen you build the Linux kernel you are asked if you want each of the supported\nfile systems.\nWhen the kernel is built, the file system startup code contains calls to\nthe initialisation routines of all of the built in file systems.\n<p>\nLinux file systems may also be built as modules and, in this case, they may\nbe demand loaded as they are needed or loaded by hand using <font face=\"helvetica\">insmod<\/font>.\nWhenever a file system module is loaded it registers itself with the kernel and unregisters\nitself when it is unloaded.\nEach file system&#8217;s initialisation routine registers itself with the Virtual File System\nand is represented by a <tt>file_system_type<\/tt> data structure\nwhich contains the name\nof the file system and a pointer to its VFS superblock read routine. The figure above\nshows that the <tt>file_system_type<\/tt> data structures\nare put into a list pointed at by the <tt>file_systems<\/tt> pointer.\nEach <tt>file_system_type<\/tt> data structure contains the following information:\n<p>\n<dl compact>\t<dt><b>Superblock read routine<\/b><\/dt><dd> This routine is called by the VFS when an\n\tinstance of the file system is mounted,\n\t<dt><b>File System name<\/b><\/dt><dd> The name of this file system, for example <tt>ext2<\/tt>,\n\t<dt><b>Device needed<\/b><\/dt><dd> Does this file system need a device to support?  Not all\n\t\tfile system need a device to hold them.  The <tt>\/proc<\/tt> file system,\n\t\tfor example, does not require a block device,\n<\/dl>\n<p>\nYou can see which file systems are registered by looking in at <tt>\/proc\/filesystems<\/tt>.\nFor example, on my system it looks like this:\n<pre>\nnodev   rootfs\nnodev   bdev\nnodev   proc\nnodev   sockfs\nnodev   tmpfs\nnodev   shm\nnodev   pipefs\n        ext2\n        minix\n        iso9660\nnodev   nfs\nnodev   devpts\n        reiserfs\nnodev   capifs\nnodev   usbdevfs\n<\/pre>\n<p>\n","protected":false},"excerpt":{"rendered":"<p>Registering the File Systems Figure: Registered File Systems When you build the Linux kernel you are asked if you want each of the supported file systems. When the kernel is built, the file system startup code contains calls to the &hellip; <a href=\"http:\/\/www.linux-tutorial.info\/?page_id=429\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-429","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=429"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/429\/revisions"}],"predecessor-version":[{"id":679,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/429\/revisions\/679"}],"wp:attachment":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}