vdev_mirror.c (236155) | vdev_mirror.c (240868) |
---|---|
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 --- 279 unchanged lines hidden (view full) --- 288 return (ZIO_PIPELINE_CONTINUE); 289 } 290 /* 291 * For normal reads just pick one child. 292 */ 293 c = vdev_mirror_child_select(zio); 294 children = (c >= 0); 295 } else { | 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 --- 279 unchanged lines hidden (view full) --- 288 return (ZIO_PIPELINE_CONTINUE); 289 } 290 /* 291 * For normal reads just pick one child. 292 */ 293 c = vdev_mirror_child_select(zio); 294 children = (c >= 0); 295 } else { |
296 ASSERT(zio->io_type == ZIO_TYPE_WRITE); | 296 ASSERT(zio->io_type == ZIO_TYPE_WRITE || 297 zio->io_type == ZIO_TYPE_FREE); |
297 298 /* | 298 299 /* |
299 * Writes go to all children. | 300 * Writes and frees go to all children. |
300 */ 301 c = 0; 302 children = mm->mm_children; 303 } 304 305 while (children--) { 306 mc = &mm->mm_child[c]; 307 zio_nowait(zio_vdev_child_io(zio, zio->io_bp, --- 64 unchanged lines hidden (view full) --- 372 * the new device turns out to be flaky, we want 373 * to be able to detach it -- which requires all 374 * writes to the old device to have succeeded. 375 */ 376 if (good_copies == 0 || zio->io_vd == NULL) 377 zio->io_error = vdev_mirror_worst_error(mm); 378 } 379 return; | 301 */ 302 c = 0; 303 children = mm->mm_children; 304 } 305 306 while (children--) { 307 mc = &mm->mm_child[c]; 308 zio_nowait(zio_vdev_child_io(zio, zio->io_bp, --- 64 unchanged lines hidden (view full) --- 373 * the new device turns out to be flaky, we want 374 * to be able to detach it -- which requires all 375 * writes to the old device to have succeeded. 376 */ 377 if (good_copies == 0 || zio->io_vd == NULL) 378 zio->io_error = vdev_mirror_worst_error(mm); 379 } 380 return; |
381 } else if (zio->io_type == ZIO_TYPE_FREE) { 382 return; |
|
380 } 381 382 ASSERT(zio->io_type == ZIO_TYPE_READ); 383 384 /* 385 * If we don't have a good copy yet, keep trying other children. 386 */ 387 /* XXPOLICY */ --- 104 unchanged lines hidden --- | 383 } 384 385 ASSERT(zio->io_type == ZIO_TYPE_READ); 386 387 /* 388 * If we don't have a good copy yet, keep trying other children. 389 */ 390 /* XXPOLICY */ --- 104 unchanged lines hidden --- |