usr/src/uts/common/fs/vfs.c
changeset 6423 437422a29d3a
parent 6318 1d4ab74726bc
child 6734 d16dda992d39
equal deleted inserted replaced
6422:d51a10d738ba 6423:437422a29d3a
    82 #include <sys/ctfs.h>
    82 #include <sys/ctfs.h>
    83 #include <sys/objfs.h>
    83 #include <sys/objfs.h>
    84 #include <sys/console.h>
    84 #include <sys/console.h>
    85 #include <sys/reboot.h>
    85 #include <sys/reboot.h>
    86 #include <sys/attr.h>
    86 #include <sys/attr.h>
       
    87 #include <sys/spa.h>
    87 
    88 
    88 #include <vm/page.h>
    89 #include <vm/page.h>
    89 
    90 
    90 #include <fs/fs_subr.h>
    91 #include <fs/fs_subr.h>
    91 
    92 
   351 	};
   352 	};
   352 
   353 
   353 	return (fs_build_vector(actual, unused_ops, vfs_ops_table, template));
   354 	return (fs_build_vector(actual, unused_ops, vfs_ops_table, template));
   354 }
   355 }
   355 
   356 
       
   357 void
       
   358 zfs_boot_init() {
       
   359 
       
   360 	if (strcmp(rootfs.bo_fstype, MNTTYPE_ZFS) == 0)
       
   361 		spa_boot_init();
       
   362 }
       
   363 
   356 int
   364 int
   357 vfs_setfsops(int fstype, const fs_operation_def_t *template, vfsops_t **actual)
   365 vfs_setfsops(int fstype, const fs_operation_def_t *template, vfsops_t **actual)
   358 {
   366 {
   359 	int error;
   367 	int error;
   360 	int unused_ops;
   368 	int unused_ops;
   840 	/*
   848 	/*
   841 	 * Notify the module code that it can begin using the
   849 	 * Notify the module code that it can begin using the
   842 	 * root filesystem instead of the boot program's services.
   850 	 * root filesystem instead of the boot program's services.
   843 	 */
   851 	 */
   844 	modrootloaded = 1;
   852 	modrootloaded = 1;
       
   853 
       
   854 	/*
       
   855 	 * Special handling for a ZFS root file system.
       
   856 	 */
       
   857 	zfs_boot_init();
       
   858 
   845 	/*
   859 	/*
   846 	 * Set up mnttab information for root
   860 	 * Set up mnttab information for root
   847 	 */
   861 	 */
   848 	vfs_setresource(rootvfs, rootfs.bo_name);
   862 	vfs_setresource(rootvfs, rootfs.bo_name);
   849 
   863