1168404Spjd/* 2168404Spjd * CDDL HEADER START 3168404Spjd * 4168404Spjd * The contents of this file are subject to the terms of the 5185029Spjd * Common Development and Distribution License (the "License"). 6185029Spjd * You may not use this file except in compliance with the License. 7168404Spjd * 8168404Spjd * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9168404Spjd * or http://www.opensolaris.org/os/licensing. 10168404Spjd * See the License for the specific language governing permissions 11168404Spjd * and limitations under the License. 12168404Spjd * 13168404Spjd * When distributing Covered Code, include this CDDL HEADER in each 14168404Spjd * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15168404Spjd * If applicable, add the following below this CDDL HEADER, with the 16168404Spjd * fields enclosed by brackets "[]" replaced with your own identifying 17168404Spjd * information: Portions Copyright [yyyy] [name of copyright owner] 18168404Spjd * 19168404Spjd * CDDL HEADER END 20168404Spjd */ 21168404Spjd/* 22185029Spjd * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23168404Spjd * Use is subject to license terms. 24255750Sdelphij * Copyright (c) 2013 Joyent, Inc. All rights reserved. 25263395Sdelphij * Copyright 2012 Nexenta Systems, Inc. All rights reserved. 26168404Spjd */ 27168404Spjd 28168404Spjd#ifndef _SYS_VDEV_DISK_H 29168404Spjd#define _SYS_VDEV_DISK_H 30168404Spjd 31168404Spjd#include <sys/vdev.h> 32168404Spjd#ifdef _KERNEL 33185029Spjd#include <sys/buf.h> 34185029Spjd#include <sys/ddi.h> 35168404Spjd#include <sys/sunldi.h> 36168404Spjd#include <sys/sunddi.h> 37168404Spjd#endif 38168404Spjd 39168404Spjd#ifdef __cplusplus 40168404Spjdextern "C" { 41168404Spjd#endif 42168404Spjd 43255750Sdelphij#ifdef _KERNEL 44168404Spjdtypedef struct vdev_disk { 45168404Spjd ddi_devid_t vd_devid; 46168404Spjd char *vd_minor; 47168404Spjd ldi_handle_t vd_lh; 48263395Sdelphij list_t vd_ldi_cbs; 49263395Sdelphij boolean_t vd_ldi_offline; 50168404Spjd} vdev_disk_t; 51255750Sdelphij#endif 52168404Spjd 53255750Sdelphijextern int vdev_disk_physio(vdev_t *, 54255750Sdelphij caddr_t, size_t, uint64_t, int, boolean_t); 55255750Sdelphij 56255750Sdelphij/* 57255750Sdelphij * Since vdev_disk.c is not compiled into libzpool, this function should only be 58255750Sdelphij * defined in the zfs kernel module. 59255750Sdelphij */ 60185029Spjd#ifdef _KERNEL 61255750Sdelphijextern int vdev_disk_ldi_physio(ldi_handle_t, caddr_t, size_t, uint64_t, int); 62185029Spjd#endif 63168404Spjd#ifdef __cplusplus 64168404Spjd} 65168404Spjd#endif 66168404Spjd 67168404Spjd#endif /* _SYS_VDEV_DISK_H */ 68