From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 01:14:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 961D4106568D; Wed, 20 Jan 2010 01:14:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BD288FC1B; Wed, 20 Jan 2010 01:14:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K1EsCN062713; Wed, 20 Jan 2010 01:14:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K1EshI062711; Wed, 20 Jan 2010 01:14:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200114.o0K1EshI062711@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 01:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202670 - stable/8/sys/boot/zfs 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: Wed, 20 Jan 2010 01:14:54 -0000 Author: delphij Date: Wed Jan 20 01:14:54 2010 New Revision: 202670 URL: http://svn.freebsd.org/changeset/base/202670 Log: MFC r201690: Space cleanup for revision 202669 committed separately for easier review. This commit is purely space changes. Submitted by: Matt Reimer Sponsored by: VPOP Technologies, Inc. Modified: stable/8/sys/boot/zfs/zfsimpl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Wed Jan 20 01:13:52 2010 (r202669) +++ stable/8/sys/boot/zfs/zfsimpl.c Wed Jan 20 01:14:54 2010 (r202670) @@ -447,44 +447,44 @@ vdev_init_from_nvlist(const unsigned cha if (!vdev) { is_new = 1; - if (!strcmp(type, VDEV_TYPE_MIRROR)) - vdev = vdev_create(guid, vdev_mirror_read); - else if (!strcmp(type, VDEV_TYPE_RAIDZ)) - vdev = vdev_create(guid, vdev_raidz_read); - else - vdev = vdev_create(guid, vdev_disk_read); + if (!strcmp(type, VDEV_TYPE_MIRROR)) + vdev = vdev_create(guid, vdev_mirror_read); + else if (!strcmp(type, VDEV_TYPE_RAIDZ)) + vdev = vdev_create(guid, vdev_raidz_read); + else + vdev = vdev_create(guid, vdev_disk_read); - vdev->v_id = id; - if (nvlist_find(nvlist, ZPOOL_CONFIG_ASHIFT, - DATA_TYPE_UINT64, 0, &ashift) == 0) - vdev->v_ashift = ashift; - else - vdev->v_ashift = 0; - if (nvlist_find(nvlist, ZPOOL_CONFIG_NPARITY, - DATA_TYPE_UINT64, 0, &nparity) == 0) - vdev->v_nparity = nparity; - else - vdev->v_nparity = 0; - if (nvlist_find(nvlist, ZPOOL_CONFIG_PATH, - DATA_TYPE_STRING, 0, &path) == 0) { - if (strlen(path) > 5 - && path[0] == '/' - && path[1] == 'd' - && path[2] == 'e' - && path[3] == 'v' - && path[4] == '/') - path += 5; - vdev->v_name = strdup(path); - } else { - if (!strcmp(type, "raidz")) { - if (vdev->v_nparity == 1) - vdev->v_name = "raidz1"; - else - vdev->v_name = "raidz2"; + vdev->v_id = id; + if (nvlist_find(nvlist, ZPOOL_CONFIG_ASHIFT, + DATA_TYPE_UINT64, 0, &ashift) == 0) + vdev->v_ashift = ashift; + else + vdev->v_ashift = 0; + if (nvlist_find(nvlist, ZPOOL_CONFIG_NPARITY, + DATA_TYPE_UINT64, 0, &nparity) == 0) + vdev->v_nparity = nparity; + else + vdev->v_nparity = 0; + if (nvlist_find(nvlist, ZPOOL_CONFIG_PATH, + DATA_TYPE_STRING, 0, &path) == 0) { + if (strlen(path) > 5 + && path[0] == '/' + && path[1] == 'd' + && path[2] == 'e' + && path[3] == 'v' + && path[4] == '/') + path += 5; + vdev->v_name = strdup(path); } else { - vdev->v_name = strdup(type); + if (!strcmp(type, "raidz")) { + if (vdev->v_nparity == 1) + vdev->v_name = "raidz1"; + else + vdev->v_name = "raidz2"; + } else { + vdev->v_name = strdup(type); + } } - } if (is_offline) vdev->v_state = VDEV_STATE_OFFLINE;