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.
40 * This file gets read by makestatetext to create text files
41 * with the names of the states, so don't change the file
47 /* present but unused. Must be 0 */
50 /* mentioned elsewhere but not known to the configuration */
54 /* The volume is up and functional, but not all plexes may be available */
56 volume_laststate = volume_up /* last value, for table dimensions */
60 /* An empty entry, not a plex at all. */
63 /* The plex has been referenced by a volume */
66 * The plex has been allocated, but there configuration
72 * A plex which has gone completely down because of
78 * A plex which has been taken down by the
83 /* A plex which is being initialized */
87 * *** The remaining states represent plexes which are
88 * at least partially up. Keep these separate so that
89 * they can be checked more easily.
93 * A plex entry which is at least partially up. Not
94 * all subdisks are available, and an inconsistency
95 * has occurred. If no other plex is uncorrupted,
96 * the volume is no longer consistent.
100 plex_firstup = plex_corrupt, /* first "up" state */
103 * A RAID-5 plex entry which is accessible, but one
104 * subdisk is down, requiring recovery for many
110 * A plex which is really up, but which has a reborn
111 * subdisk which we don't completely trust, and
112 * which we don't want to read if we can avoid it
117 * A plex entry which is completely up. All subdisks
122 plex_laststate = plex_up /* last value, for table dimensions */
127 /* An empty entry, not a subdisk at all. */
131 * A subdisk entry which has not been created
132 * completely. Some fields may be empty.
136 /* The subdisk has been referenced by a plex */
140 * A subdisk entry which has been created completely.
141 * All fields are correct, but the disk hasn't
147 * A subdisk entry which has been created completely.
148 * All fields are correct, and the disk has been
149 * updated, but there is no data on the disk.
154 * A subdisk entry which has been created completely and
155 * which is currently being initialized
160 * A subdisk entry which has been initialized,
161 * but which can't come up because it would
162 * cause inconsistencies.
166 /* *** The following states represent invalid data */
168 * A subdisk entry which has been created completely.
169 * All fields are correct, the config on disk has been
170 * updated, and the data was valid, but since then the
171 * drive has been taken down, and as a result updates
177 * A subdisk entry which has been created completely.
178 * All fields are correct, the disk has been updated,
179 * and the data was valid, but since then the drive
180 * has been crashed and updates have been lost.
184 /* *** The following states represent valid, inaccessible data */
187 * A subdisk entry which has been created completely.
188 * All fields are correct, the disk has been updated,
189 * and the data was valid, but since then the drive
190 * has gone down. No attempt has been made to write
191 * to the subdisk since the crash, so the data is valid.
196 * A subdisk entry which was up, which contained
197 * valid data, and which was taken down by the
198 * administrator. The data is valid.
203 * *** This is invalid data (the subdisk previously had
204 * a numerically lower state), but it is currently in the
205 * process of being revived. We can write but not read.
210 * *** The following states represent accessible subdisks
215 * A subdisk entry which has been created completely.
216 * All fields are correct, the disk has been updated,
217 * and the data was valid, but since then the drive
218 * has gone down and up again. No updates were lost,
219 * but it is possible that the subdisk has been
220 * damaged. We won't read from this subdisk if we
221 * have a choice. If this is the only subdisk which
222 * covers this address space in the plex, we set its
223 * state to sd_up under these circumstances, so this
224 * status implies that there is another subdisk to
225 * fulfil the request.
230 * A subdisk entry which has been created completely.
231 * All fields are correct, the disk has been updated,
232 * and the data is valid.
236 sd_laststate = sd_up /* last value, for table dimensions */
241 /* present but unused. Must be 0 */
244 /* just mentioned in some other config entry */
252 drive_laststate = drive_up /* last value, for table dimensions */
255 /* Local Variables: */
256 /* fill-column: 50 */