2 * Copyright (c) 1997, 1998
3 * Nan Yang Computer Services Limited. All rights reserved.
5 * This software is distributed under the so-called ``Berkeley
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by Nan Yang Computer
20 * 4. Neither the name of the Company nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
24 * This software is provided ``as is'', and any express or implied
25 * warranties, including, but not limited to, the implied warranties of
26 * merchantability and fitness for a particular purpose are disclaimed.
27 * In no event shall the company or contributors be liable for any
28 * direct, indirect, incidental, special, exemplary, or consequential
29 * damages (including, but not limited to, procurement of substitute
30 * goods or services; loss of use, data, or profits; or business
31 * interruption) however caused and on any theory of liability, whether
32 * in contract, strict liability, or tort (including negligence or
33 * otherwise) arising in any way out of the use of this software, even if
34 * advised of the possibility of such damage.
36 * $FreeBSD: src/sys/dev/vinum/vinumstate.h,v 1.9 1999/08/28 00:42:43 peter Exp $
37 * $DragonFly: src/sys/dev/raid/vinum/vinumstate.h,v 1.2 2003/06/17 04:28:33 dillon Exp $
41 * This file gets read by makestatetext to create text files
42 * with the names of the states, so don't change the file
48 /* present but unused. Must be 0 */
51 /* mentioned elsewhere but not known to the configuration */
55 /* The volume is up and functional, but not all plexes may be available */
57 volume_laststate = volume_up /* last value, for table dimensions */
61 /* An empty entry, not a plex at all. */
64 /* The plex has been referenced by a volume */
67 * The plex has been allocated, but there configuration
73 * A plex which has gone completely down because of
79 * A plex which has been taken down by the
84 /* A plex which is being initialized */
88 * *** The remaining states represent plexes which are
89 * at least partially up. Keep these separate so that
90 * they can be checked more easily.
94 * A plex entry which is at least partially up. Not
95 * all subdisks are available, and an inconsistency
96 * has occurred. If no other plex is uncorrupted,
97 * the volume is no longer consistent.
101 plex_firstup = plex_corrupt, /* first "up" state */
104 * A RAID-5 plex entry which is accessible, but one
105 * subdisk is down, requiring recovery for many
111 * A plex which is really up, but which has a reborn
112 * subdisk which we don't completely trust, and
113 * which we don't want to read if we can avoid it
118 * A plex entry which is completely up. All subdisks
123 plex_laststate = plex_up /* last value, for table dimensions */
128 /* An empty entry, not a subdisk at all. */
132 * A subdisk entry which has not been created
133 * completely. Some fields may be empty.
137 /* The subdisk has been referenced by a plex */
141 * A subdisk entry which has been created completely.
142 * All fields are correct, but the disk hasn't
148 * A subdisk entry which has been created completely.
149 * All fields are correct, and the disk has been
150 * updated, but there is no data on the disk.
155 * A subdisk entry which has been created completely and
156 * which is currently being initialized
161 * A subdisk entry which has been initialized,
162 * but which can't come up because it would
163 * cause inconsistencies.
167 /* *** The following states represent invalid data */
169 * A subdisk entry which has been created completely.
170 * All fields are correct, the config on disk has been
171 * updated, and the data was valid, but since then the
172 * drive has been taken down, and as a result updates
178 * A subdisk entry which has been created completely.
179 * All fields are correct, the disk has been updated,
180 * and the data was valid, but since then the drive
181 * has been crashed and updates have been lost.
185 /* *** The following states represent valid, inaccessible data */
188 * A subdisk entry which has been created completely.
189 * All fields are correct, the disk has been updated,
190 * and the data was valid, but since then the drive
191 * has gone down. No attempt has been made to write
192 * to the subdisk since the crash, so the data is valid.
197 * A subdisk entry which was up, which contained
198 * valid data, and which was taken down by the
199 * administrator. The data is valid.
204 * *** This is invalid data (the subdisk previously had
205 * a numerically lower state), but it is currently in the
206 * process of being revived. We can write but not read.
211 * *** The following states represent accessible subdisks
216 * A subdisk entry which has been created completely.
217 * All fields are correct, the disk has been updated,
218 * and the data was valid, but since then the drive
219 * has gone down and up again. No updates were lost,
220 * but it is possible that the subdisk has been
221 * damaged. We won't read from this subdisk if we
222 * have a choice. If this is the only subdisk which
223 * covers this address space in the plex, we set its
224 * state to sd_up under these circumstances, so this
225 * status implies that there is another subdisk to
226 * fulfil the request.
231 * A subdisk entry which has been created completely.
232 * All fields are correct, the disk has been updated,
233 * and the data is valid.
237 sd_laststate = sd_up /* last value, for table dimensions */
242 /* present but unused. Must be 0 */
245 /* just mentioned in some other config entry */
253 drive_laststate = drive_up /* last value, for table dimensions */
256 /* Local Variables: */
257 /* fill-column: 50 */