translate.c (219089) | translate.c (247265) |
---|---|
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 --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. | 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 --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. |
23 * Copyright (c) 2012 by Delphix. All rights reserved. |
|
23 */ 24 25#include <libzfs.h> 26 27#include <sys/zfs_context.h> 28 29#include <errno.h> 30#include <fcntl.h> --- 419 unchanged lines hidden (view full) --- 450 "pool '%s'\n", device, pool); 451 return (-1); 452 } 453 454 verify(nvlist_lookup_uint64(tgt, ZPOOL_CONFIG_GUID, 455 &record->zi_guid) == 0); 456 } 457 | 24 */ 25 26#include <libzfs.h> 27 28#include <sys/zfs_context.h> 29 30#include <errno.h> 31#include <fcntl.h> --- 419 unchanged lines hidden (view full) --- 451 "pool '%s'\n", device, pool); 452 return (-1); 453 } 454 455 verify(nvlist_lookup_uint64(tgt, ZPOOL_CONFIG_GUID, 456 &record->zi_guid) == 0); 457 } 458 |
459 /* 460 * Device faults can take on three different forms: 461 * 1). delayed or hanging I/O 462 * 2). zfs label faults 463 * 3). generic disk faults 464 */ 465 if (record->zi_timer != 0) { 466 record->zi_cmd = ZINJECT_DELAY_IO; 467 } else if (label_type != TYPE_INVAL) { 468 record->zi_cmd = ZINJECT_LABEL_FAULT; 469 } else { 470 record->zi_cmd = ZINJECT_DEVICE_FAULT; 471 } 472 |
|
458 switch (label_type) { 459 case TYPE_LABEL_UBERBLOCK: 460 record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]); 461 record->zi_end = record->zi_start + VDEV_UBERBLOCK_RING - 1; 462 break; 463 case TYPE_LABEL_NVLIST: 464 record->zi_start = offsetof(vdev_label_t, vl_vdev_phys); 465 record->zi_end = record->zi_start + VDEV_PHYS_SIZE - 1; --- 12 unchanged lines hidden --- | 473 switch (label_type) { 474 case TYPE_LABEL_UBERBLOCK: 475 record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]); 476 record->zi_end = record->zi_start + VDEV_UBERBLOCK_RING - 1; 477 break; 478 case TYPE_LABEL_NVLIST: 479 record->zi_start = offsetof(vdev_label_t, vl_vdev_phys); 480 record->zi_end = record->zi_start + VDEV_PHYS_SIZE - 1; --- 12 unchanged lines hidden --- |