svn commit: r240335 - in head/sys/boot: i386/loader sparc64/loader
Andrey V. Elsukov
ae at FreeBSD.org
Tue Sep 11 04:54:45 UTC 2012
Author: ae
Date: Tue Sep 11 04:54:44 2012
New Revision: 240335
URL: http://svn.freebsd.org/changeset/base/240335
Log:
Slightly reduce an overhead for the open() call in the zfsloader.
libstand(3) tries to detect file system in the predefined order,
but zfsloader usually is used for the booting from ZFS, and there is
no need to try detect several file system types for each open() call.
Modified:
head/sys/boot/i386/loader/conf.c
head/sys/boot/sparc64/loader/main.c
Modified: head/sys/boot/i386/loader/conf.c
==============================================================================
--- head/sys/boot/i386/loader/conf.c Tue Sep 11 04:53:32 2012 (r240334)
+++ head/sys/boot/i386/loader/conf.c Tue Sep 11 04:54:44 2012 (r240335)
@@ -70,6 +70,9 @@ struct devsw *devsw[] = {
};
struct fs_ops *file_system[] = {
+#if defined(LOADER_ZFS_SUPPORT)
+ &zfs_fsops,
+#endif
&ufs_fsops,
&ext2fs_fsops,
&dosfs_fsops,
@@ -78,9 +81,6 @@ struct fs_ops *file_system[] = {
&nandfs_fsops,
#endif
&splitfs_fsops,
-#if defined(LOADER_ZFS_SUPPORT)
- &zfs_fsops,
-#endif
#ifdef LOADER_GZIP_SUPPORT
&gzipfs_fsops,
#endif
Modified: head/sys/boot/sparc64/loader/main.c
==============================================================================
--- head/sys/boot/sparc64/loader/main.c Tue Sep 11 04:53:32 2012 (r240334)
+++ head/sys/boot/sparc64/loader/main.c Tue Sep 11 04:54:44 2012 (r240335)
@@ -170,15 +170,15 @@ struct file_format *file_formats[] = {
};
struct fs_ops *file_system[] = {
+#ifdef LOADER_ZFS_SUPPORT
+ &zfs_fsops,
+#endif
#ifdef LOADER_UFS_SUPPORT
&ufs_fsops,
#endif
#ifdef LOADER_CD9660_SUPPORT
&cd9660_fsops,
#endif
-#ifdef LOADER_ZFS_SUPPORT
- &zfs_fsops,
-#endif
#ifdef LOADER_ZIP_SUPPORT
&zipfs_fsops,
#endif
More information about the svn-src-all
mailing list