vdev_mirror.c (249195) | vdev_mirror.c (254591) |
---|---|
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 --- 118 unchanged lines hidden (view full) --- 127 128 zio->io_vsd = mm; 129 zio->io_vsd_ops = &vdev_mirror_vsd_ops; 130 return (mm); 131} 132 133static int 134vdev_mirror_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, | 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 --- 118 unchanged lines hidden (view full) --- 127 128 zio->io_vsd = mm; 129 zio->io_vsd_ops = &vdev_mirror_vsd_ops; 130 return (mm); 131} 132 133static int 134vdev_mirror_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, |
135 uint64_t *ashift) | 135 uint64_t *logical_ashift, uint64_t *physical_ashift) |
136{ 137 int numerrors = 0; 138 int lasterror = 0; 139 140 if (vd->vdev_children == 0) { 141 vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL; 142 return (SET_ERROR(EINVAL)); 143 } --- 6 unchanged lines hidden (view full) --- 150 if (cvd->vdev_open_error) { 151 lasterror = cvd->vdev_open_error; 152 numerrors++; 153 continue; 154 } 155 156 *asize = MIN(*asize - 1, cvd->vdev_asize - 1) + 1; 157 *max_asize = MIN(*max_asize - 1, cvd->vdev_max_asize - 1) + 1; | 136{ 137 int numerrors = 0; 138 int lasterror = 0; 139 140 if (vd->vdev_children == 0) { 141 vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL; 142 return (SET_ERROR(EINVAL)); 143 } --- 6 unchanged lines hidden (view full) --- 150 if (cvd->vdev_open_error) { 151 lasterror = cvd->vdev_open_error; 152 numerrors++; 153 continue; 154 } 155 156 *asize = MIN(*asize - 1, cvd->vdev_asize - 1) + 1; 157 *max_asize = MIN(*max_asize - 1, cvd->vdev_max_asize - 1) + 1; |
158 *ashift = MAX(*ashift, cvd->vdev_ashift); | 158 *logical_ashift = MAX(*logical_ashift, cvd->vdev_ashift); 159 *physical_ashift = MAX(*physical_ashift, 160 cvd->vdev_physical_ashift); |
159 } 160 161 if (numerrors == vd->vdev_children) { 162 vd->vdev_stat.vs_aux = VDEV_AUX_NO_REPLICAS; 163 return (lasterror); 164 } 165 166 return (0); --- 328 unchanged lines hidden --- | 161 } 162 163 if (numerrors == vd->vdev_children) { 164 vd->vdev_stat.vs_aux = VDEV_AUX_NO_REPLICAS; 165 return (lasterror); 166 } 167 168 return (0); --- 328 unchanged lines hidden --- |