vdev_mirror.c (269407) | vdev_mirror.c (274304) |
---|---|
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 --- 10 unchanged lines hidden (view full) --- 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26/* | 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 --- 10 unchanged lines hidden (view full) --- 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26/* |
27 * Copyright (c) 2013 by Delphix. All rights reserved. | 27 * Copyright (c) 2012, 2014 by Delphix. All rights reserved. |
28 */ 29 30#include <sys/zfs_context.h> 31#include <sys/spa.h> 32#include <sys/vdev_impl.h> 33#include <sys/zio.h> 34#include <sys/fs/zfs.h> 35 --- 384 unchanged lines hidden (view full) --- 420 } 421 422 /* 423 * Every child failed. There's no place left to look. 424 */ 425 return (-1); 426} 427 | 28 */ 29 30#include <sys/zfs_context.h> 31#include <sys/spa.h> 32#include <sys/vdev_impl.h> 33#include <sys/zio.h> 34#include <sys/fs/zfs.h> 35 --- 384 unchanged lines hidden (view full) --- 420 } 421 422 /* 423 * Every child failed. There's no place left to look. 424 */ 425 return (-1); 426} 427 |
428static int | 428static void |
429vdev_mirror_io_start(zio_t *zio) 430{ 431 mirror_map_t *mm; 432 mirror_child_t *mc; 433 int c, children; 434 435 mm = vdev_mirror_map_init(zio); 436 --- 8 unchanged lines hidden (view full) --- 445 for (c = 0; c < mm->mm_children; c++) { 446 mc = &mm->mm_child[c]; 447 zio_nowait(zio_vdev_child_io(zio, zio->io_bp, 448 mc->mc_vd, mc->mc_offset, 449 zio_buf_alloc(zio->io_size), zio->io_size, 450 zio->io_type, zio->io_priority, 0, 451 vdev_mirror_scrub_done, mc)); 452 } | 429vdev_mirror_io_start(zio_t *zio) 430{ 431 mirror_map_t *mm; 432 mirror_child_t *mc; 433 int c, children; 434 435 mm = vdev_mirror_map_init(zio); 436 --- 8 unchanged lines hidden (view full) --- 445 for (c = 0; c < mm->mm_children; c++) { 446 mc = &mm->mm_child[c]; 447 zio_nowait(zio_vdev_child_io(zio, zio->io_bp, 448 mc->mc_vd, mc->mc_offset, 449 zio_buf_alloc(zio->io_size), zio->io_size, 450 zio->io_type, zio->io_priority, 0, 451 vdev_mirror_scrub_done, mc)); 452 } |
453 zio_interrupt(zio); 454 return (ZIO_PIPELINE_STOP); | 453 zio_execute(zio); 454 return; |
455 } 456 /* 457 * For normal reads just pick one child. 458 */ 459 c = vdev_mirror_child_select(zio); 460 children = (c >= 0); 461 } else { 462 ASSERT(zio->io_type == ZIO_TYPE_WRITE || --- 10 unchanged lines hidden (view full) --- 473 mc = &mm->mm_child[c]; 474 zio_nowait(zio_vdev_child_io(zio, zio->io_bp, 475 mc->mc_vd, mc->mc_offset, zio->io_data, zio->io_size, 476 zio->io_type, zio->io_priority, 0, 477 vdev_mirror_child_done, mc)); 478 c++; 479 } 480 | 455 } 456 /* 457 * For normal reads just pick one child. 458 */ 459 c = vdev_mirror_child_select(zio); 460 children = (c >= 0); 461 } else { 462 ASSERT(zio->io_type == ZIO_TYPE_WRITE || --- 10 unchanged lines hidden (view full) --- 473 mc = &mm->mm_child[c]; 474 zio_nowait(zio_vdev_child_io(zio, zio->io_bp, 475 mc->mc_vd, mc->mc_offset, zio->io_data, zio->io_size, 476 zio->io_type, zio->io_priority, 0, 477 vdev_mirror_child_done, mc)); 478 c++; 479 } 480 |
481 zio_interrupt(zio); 482 return (ZIO_PIPELINE_STOP); | 481 zio_execute(zio); |
483} 484 485static int 486vdev_mirror_worst_error(mirror_map_t *mm) 487{ 488 int error[2] = { 0, 0 }; 489 490 for (int c = 0; c < mm->mm_children; c++) { --- 171 unchanged lines hidden --- | 482} 483 484static int 485vdev_mirror_worst_error(mirror_map_t *mm) 486{ 487 int error[2] = { 0, 0 }; 488 489 for (int c = 0; c < mm->mm_children; c++) { --- 171 unchanged lines hidden --- |