From owner-svn-src-all@FreeBSD.ORG Tue Sep 11 04:54:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 206DF106564A; Tue, 11 Sep 2012 04:54:45 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BF428FC0A; Tue, 11 Sep 2012 04:54:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B4siR3079570; Tue, 11 Sep 2012 04:54:44 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B4siJL079567; Tue, 11 Sep 2012 04:54:44 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209110454.q8B4siJL079567@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 11 Sep 2012 04:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240335 - in head/sys/boot: i386/loader sparc64/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 04:54:45 -0000 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