Deleted Added
full compact
vdev.c (339104) vdev.c (339105)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 738 unchanged lines hidden (view full) ---

747 }
748
749 if (parent && !parent->vdev_parent && alloctype != VDEV_ALLOC_ATTACH) {
750 ASSERT(alloctype == VDEV_ALLOC_LOAD ||
751 alloctype == VDEV_ALLOC_ADD ||
752 alloctype == VDEV_ALLOC_SPLIT ||
753 alloctype == VDEV_ALLOC_ROOTPOOL);
754 vd->vdev_mg = metaslab_group_create(islog ?
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 738 unchanged lines hidden (view full) ---

747 }
748
749 if (parent && !parent->vdev_parent && alloctype != VDEV_ALLOC_ATTACH) {
750 ASSERT(alloctype == VDEV_ALLOC_LOAD ||
751 alloctype == VDEV_ALLOC_ADD ||
752 alloctype == VDEV_ALLOC_SPLIT ||
753 alloctype == VDEV_ALLOC_ROOTPOOL);
754 vd->vdev_mg = metaslab_group_create(islog ?
755 spa_log_class(spa) : spa_normal_class(spa), vd);
755 spa_log_class(spa) : spa_normal_class(spa), vd,
756 spa->spa_alloc_count);
756 }
757
758 if (vd->vdev_ops->vdev_op_leaf &&
759 (alloctype == VDEV_ALLOC_LOAD || alloctype == VDEV_ALLOC_SPLIT)) {
760 (void) nvlist_lookup_uint64(nv,
761 ZPOOL_CONFIG_VDEV_LEAF_ZAP, &vd->vdev_leaf_zap);
762 } else {
763 ASSERT0(vd->vdev_leaf_zap);

--- 371 unchanged lines hidden (view full) ---

1135
1136 if (oldc != 0) {
1137 bcopy(vd->vdev_ms, mspp, oldc * sizeof (*mspp));
1138 kmem_free(vd->vdev_ms, oldc * sizeof (*mspp));
1139 }
1140
1141 vd->vdev_ms = mspp;
1142 vd->vdev_ms_count = newc;
757 }
758
759 if (vd->vdev_ops->vdev_op_leaf &&
760 (alloctype == VDEV_ALLOC_LOAD || alloctype == VDEV_ALLOC_SPLIT)) {
761 (void) nvlist_lookup_uint64(nv,
762 ZPOOL_CONFIG_VDEV_LEAF_ZAP, &vd->vdev_leaf_zap);
763 } else {
764 ASSERT0(vd->vdev_leaf_zap);

--- 371 unchanged lines hidden (view full) ---

1136
1137 if (oldc != 0) {
1138 bcopy(vd->vdev_ms, mspp, oldc * sizeof (*mspp));
1139 kmem_free(vd->vdev_ms, oldc * sizeof (*mspp));
1140 }
1141
1142 vd->vdev_ms = mspp;
1143 vd->vdev_ms_count = newc;
1143
1144 for (m = oldc; m < newc; m++) {
1145 uint64_t object = 0;
1146
1147 /*
1148 * vdev_ms_array may be 0 if we are creating the "fake"
1149 * metaslabs for an indirect vdev for zdb's leak detection.
1150 * See zdb_leak_init().
1151 */

--- 3114 unchanged lines hidden ---
1144 for (m = oldc; m < newc; m++) {
1145 uint64_t object = 0;
1146
1147 /*
1148 * vdev_ms_array may be 0 if we are creating the "fake"
1149 * metaslabs for an indirect vdev for zdb's leak detection.
1150 * See zdb_leak_init().
1151 */

--- 3114 unchanged lines hidden ---