| 1 | /* $NetBSD: raidframeio.h,v 1.7 2016/01/06 17:40:50 christos Exp $ */ |
| 2 | /*- |
| 3 | * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. |
| 4 | * All rights reserved. |
| 5 | * |
| 6 | * This code is derived from software contributed to The NetBSD Foundation |
| 7 | * by Greg Oster |
| 8 | * |
| 9 | * Redistribution and use in source and binary forms, with or without |
| 10 | * modification, are permitted provided that the following conditions |
| 11 | * are met: |
| 12 | * 1. Redistributions of source code must retain the above copyright |
| 13 | * notice, this list of conditions and the following disclaimer. |
| 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| 15 | * notice, this list of conditions and the following disclaimer in the |
| 16 | * documentation and/or other materials provided with the distribution. |
| 17 | * |
| 18 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
| 20 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
| 22 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 28 | * POSSIBILITY OF SUCH DAMAGE. |
| 29 | */ |
| 30 | |
| 31 | /* |
| 32 | * Copyright (c) 1995 Carnegie-Mellon University. |
| 33 | * All rights reserved. |
| 34 | * |
| 35 | * Author: Mark Holland |
| 36 | * |
| 37 | * Permission to use, copy, modify and distribute this software and |
| 38 | * its documentation is hereby granted, provided that both the copyright |
| 39 | * notice and this permission notice appear in all copies of the |
| 40 | * software, derivative works or modified versions, and any portions |
| 41 | * thereof, and that both notices appear in supporting documentation. |
| 42 | * |
| 43 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" |
| 44 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND |
| 45 | * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. |
| 46 | * |
| 47 | * Carnegie Mellon requests users of this software to return to |
| 48 | * |
| 49 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU |
| 50 | * School of Computer Science |
| 51 | * Carnegie Mellon University |
| 52 | * Pittsburgh PA 15213-3890 |
| 53 | * |
| 54 | * any improvements or extensions that they make and grant Carnegie the |
| 55 | * rights to redistribute these changes. |
| 56 | */ |
| 57 | |
| 58 | /***************************************************** |
| 59 | * |
| 60 | * raidframeio.h |
| 61 | * |
| 62 | * IOCTL's used by RAIDframe. |
| 63 | * |
| 64 | *****************************************************/ |
| 65 | |
| 66 | |
| 67 | #ifndef _RF_RAIDFRAMEIO_H_ |
| 68 | #define _RF_RAIDFRAMEIO_H_ |
| 69 | |
| 70 | #include "raidframevar.h" |
| 71 | |
| 72 | /* 1 was RAIDFRAME_CONFIGURE */ |
| 73 | #define RAIDFRAME_SHUTDOWN _IO ('r', 2) /* shutdown the driver */ |
| 74 | #define RAIDFRAME_TUR _IOW ('r', 3, dev_t) /* debug only: test unit |
| 75 | * ready */ |
| 76 | #define RAIDFRAME_TEST_ACC _IOWR('r', 4, struct rf_test_acc) /* run a test access */ |
| 77 | #define RAIDFRAME_FAIL_DISK _IOW ('r', 5, struct rf_recon_req) /* fail a disk & |
| 78 | * optionally start |
| 79 | * recon */ |
| 80 | #define RAIDFRAME_CHECK_RECON_STATUS _IOWR('r', 6, int) /* get reconstruction % |
| 81 | * complete on indicated |
| 82 | * row */ |
| 83 | #define RAIDFRAME_REWRITEPARITY _IO ('r', 7) /* rewrite (initialize) |
| 84 | * all parity */ |
| 85 | #define RAIDFRAME_COPYBACK _IO ('r', 8) /* copy reconstructed |
| 86 | * data back to replaced |
| 87 | * disk */ |
| 88 | #define RAIDFRAME_SPARET_WAIT _IOR ('r', 9, RF_SparetWait_t) /* does not return until |
| 89 | * kernel needs a spare |
| 90 | * table */ |
| 91 | #define RAIDFRAME_SEND_SPARET _IOW ('r', 10, void *) /* used to send a spare |
| 92 | * table down into the |
| 93 | * kernel */ |
| 94 | #define RAIDFRAME_ABORT_SPARET_WAIT _IO ('r', 11) /* used to wake up the |
| 95 | * sparemap daemon & |
| 96 | * tell it to exit */ |
| 97 | #define RAIDFRAME_START_ATRACE _IO ('r', 12) /* start tracing |
| 98 | * accesses */ |
| 99 | #define RAIDFRAME_STOP_ATRACE _IO ('r', 13) /* stop tracing accesses */ |
| 100 | #define RAIDFRAME_GET_SIZE _IOR ('r', 14, int) /* get size (# sectors) |
| 101 | * in raid device */ |
| 102 | /* 15 was RAIDFRAME_GET_INFO */ |
| 103 | #define RAIDFRAME_RESET_ACCTOTALS _IO ('r', 16) /* reset AccTotals for |
| 104 | * device */ |
| 105 | #define RAIDFRAME_GET_ACCTOTALS _IOR ('r', 17, RF_AccTotals_t) /* retrieve AccTotals |
| 106 | * for device */ |
| 107 | #define RAIDFRAME_KEEP_ACCTOTALS _IOW ('r', 18, int) /* turn AccTotals on or |
| 108 | * off for device */ |
| 109 | #define RAIDFRAME_GET_COMPONENT_LABEL _IOWR ('r', 19, RF_ComponentLabel_t *) |
| 110 | #define RAIDFRAME_SET_COMPONENT_LABEL _IOW ('r', 20, RF_ComponentLabel_t) |
| 111 | |
| 112 | #define RAIDFRAME_INIT_LABELS _IOW ('r', 21, RF_ComponentLabel_t) |
| 113 | #define RAIDFRAME_ADD_HOT_SPARE _IOW ('r', 22, RF_SingleComponent_t) |
| 114 | #define RAIDFRAME_REMOVE_HOT_SPARE _IOW ('r', 23, RF_SingleComponent_t) |
| 115 | #define RAIDFRAME_REBUILD_IN_PLACE _IOW ('r', 24, RF_SingleComponent_t) |
| 116 | #define RAIDFRAME_CHECK_PARITY _IOWR ('r', 25, int) |
| 117 | #define RAIDFRAME_CHECK_PARITYREWRITE_STATUS _IOWR ('r', 26, int) |
| 118 | #define RAIDFRAME_CHECK_COPYBACK_STATUS _IOWR ('r', 27, int) |
| 119 | #define RAIDFRAME_SET_AUTOCONFIG _IOWR ('r', 28, int) |
| 120 | #define RAIDFRAME_SET_ROOT _IOWR ('r', 29, int) |
| 121 | #define RAIDFRAME_DELETE_COMPONENT _IOW ('r', 30, RF_SingleComponent_t) |
| 122 | #define RAIDFRAME_INCORPORATE_HOT_SPARE _IOW ('r', 31, RF_SingleComponent_t) |
| 123 | /* 'Extended' status versions */ |
| 124 | #define RAIDFRAME_CHECK_RECON_STATUS_EXT _IOWR('r', 32, RF_ProgressInfo_t *) |
| 125 | #define RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT _IOWR ('r', 33, RF_ProgressInfo_t *) |
| 126 | #define RAIDFRAME_CHECK_COPYBACK_STATUS_EXT _IOWR ('r', 34, RF_ProgressInfo_t *) |
| 127 | #define RAIDFRAME_CONFIGURE _IOW ('r', 35, void *) /* configure the driver */ |
| 128 | #define RAIDFRAME_GET_INFO _IOWR('r', 36, RF_DeviceConfig_t *) /* get configuration */ |
| 129 | |
| 130 | #define RAIDFRAME_PARITYMAP_STATUS _IOR('r', 37, struct rf_pmstat) |
| 131 | #define RAIDFRAME_PARITYMAP_GET_DISABLE _IOR('r', 38, int) |
| 132 | #define RAIDFRAME_PARITYMAP_SET_DISABLE _IOW('r', 39, int) |
| 133 | #define RAIDFRAME_PARITYMAP_SET_PARAMS _IOW('r', 40, struct rf_pmparams) |
| 134 | #define RAIDFRAME_SET_LAST_UNIT _IOW('r', 41, int) |
| 135 | |
| 136 | #endif /* !_RF_RAIDFRAMEIO_H_ */ |
| 137 | |