array.h (9c79794016d679440487dea61b3b986397c9ecbb) array.h (1713e81b9cdf06d2a9a365a7ded13a54fad84798)
1/*
1/*
2 * Copyright (c) 2004-2005 HighPoint Technologies, Inc.
2 * Copyright (c) 2003-2004 HighPoint Technologies, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright

--- 6 unchanged lines hidden (view full) ---

17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright

--- 6 unchanged lines hidden (view full) ---

17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD$
27 */
28
29#ifndef _ARRAY_H_
30#define _ARRAY_H_
31
32/*
33 * time represented in DWORD format
34 */

--- 22 unchanged lines hidden (view full) ---

57 * basic information
58 */
59 UCHAR bArnMember; /* the number of members in array */
60 UCHAR bArRealnMember; /* real member count */
61 UCHAR bArBlockSizeShift; /* the number of shift bit for a block */
62 UCHAR reserve1;
63
64 ULONG dArStamp; /* array ID. all disks in a array has same ID */
25 */
26
27#ifndef _ARRAY_H_
28#define _ARRAY_H_
29
30/*
31 * time represented in DWORD format
32 */

--- 22 unchanged lines hidden (view full) ---

55 * basic information
56 */
57 UCHAR bArnMember; /* the number of members in array */
58 UCHAR bArRealnMember; /* real member count */
59 UCHAR bArBlockSizeShift; /* the number of shift bit for a block */
60 UCHAR reserve1;
61
62 ULONG dArStamp; /* array ID. all disks in a array has same ID */
65 ULONG failedStamps[4]; /* stamp for failed members */
66 USHORT bStripeWitch; /* = (1 << BlockSizeShift) */
67
68 USHORT rf_broken: 1;
69 USHORT rf_need_rebuild: 1; /* one member's data are incorrect.
70 for R5, if CriticalMembers==0, it means
71 parity needs to be constructed */
72 USHORT rf_need_sync: 1; /* need write array info to disk */
73 /* ioctl flags */

--- 5 unchanged lines hidden (view full) ---

79 USHORT rf_abort_rebuild: 1;
80 USHORT rf_duplicate_and_create: 1;
81 USHORT rf_duplicate_and_created: 1;
82 USHORT rf_duplicate_must_done: 1;
83 USHORT rf_raid15: 1;
84
85 USHORT CriticalMembers; /* tell which member is critial */
86 UCHAR last_read; /* for RAID 1 load banlancing */
63 USHORT bStripeWitch; /* = (1 << BlockSizeShift) */
64
65 USHORT rf_broken: 1;
66 USHORT rf_need_rebuild: 1; /* one member's data are incorrect.
67 for R5, if CriticalMembers==0, it means
68 parity needs to be constructed */
69 USHORT rf_need_sync: 1; /* need write array info to disk */
70 /* ioctl flags */

--- 5 unchanged lines hidden (view full) ---

76 USHORT rf_abort_rebuild: 1;
77 USHORT rf_duplicate_and_create: 1;
78 USHORT rf_duplicate_and_created: 1;
79 USHORT rf_duplicate_must_done: 1;
80 USHORT rf_raid15: 1;
81
82 USHORT CriticalMembers; /* tell which member is critial */
83 UCHAR last_read; /* for RAID 1 load banlancing */
87 UCHAR alreadyBroken;
84 UCHAR pad1;
88
89 LBA_T RebuildSectors; /* how many sectors is OK (LBA on member disk) */
90
91 PVDevice pMember[MAX_MEMBERS];
92 /*
93 * utility working data
94 */
95 UCHAR ArrayName[MAX_ARRAY_NAME]; /* The Name of the array */

--- 51 unchanged lines hidden (view full) ---

147 TIME_RECORD CreateTime; /* when created it */
148 UCHAR Description[64]; /* array description */
149 UCHAR CreateManager[16]; /* who created it */
150
151#define ArrayDescript_3_0_size ((unsigned)(ULONG_PTR)&((struct _ArrayDescript *)0)->bCheckSum31)
152#define ArrayDescript_3_1_size 512
153
154 UCHAR bCheckSum31; /* new check sum */
85
86 LBA_T RebuildSectors; /* how many sectors is OK (LBA on member disk) */
87
88 PVDevice pMember[MAX_MEMBERS];
89 /*
90 * utility working data
91 */
92 UCHAR ArrayName[MAX_ARRAY_NAME]; /* The Name of the array */

--- 51 unchanged lines hidden (view full) ---

144 TIME_RECORD CreateTime; /* when created it */
145 UCHAR Description[64]; /* array description */
146 UCHAR CreateManager[16]; /* who created it */
147
148#define ArrayDescript_3_0_size ((unsigned)(ULONG_PTR)&((struct _ArrayDescript *)0)->bCheckSum31)
149#define ArrayDescript_3_1_size 512
150
151 UCHAR bCheckSum31; /* new check sum */
155 UCHAR PrivateFlag1; /* private */
156 UCHAR alreadyBroken; /* last stamp has been saved to failedStamps */
157
152 UCHAR reserve2[2];
158#ifdef __BIG_ENDIAN_BITFIELD
159 UCHAR df_read_ahead: 1; /* enable read ahead */
160 UCHAR df_read_ahead_set: 1;
161 UCHAR df_write_cache: 1; /* enable write cache */
162 UCHAR df_write_cache_set: 1;
163 UCHAR df_ncq: 1; /* enable NCQ */
164 UCHAR df_ncq_set: 1;
165 UCHAR df_tcq: 1; /* enable TCQ */

--- 10 unchanged lines hidden (view full) ---

176#endif
177
178 struct {
179 ULONG CapacityHi32;
180 ULONG RebuildSectorsHi32;
181 }
182 levelex[2];
183
153#ifdef __BIG_ENDIAN_BITFIELD
154 UCHAR df_read_ahead: 1; /* enable read ahead */
155 UCHAR df_read_ahead_set: 1;
156 UCHAR df_write_cache: 1; /* enable write cache */
157 UCHAR df_write_cache_set: 1;
158 UCHAR df_ncq: 1; /* enable NCQ */
159 UCHAR df_ncq_set: 1;
160 UCHAR df_tcq: 1; /* enable TCQ */

--- 10 unchanged lines hidden (view full) ---

171#endif
172
173 struct {
174 ULONG CapacityHi32;
175 ULONG RebuildSectorsHi32;
176 }
177 levelex[2];
178
184 ULONG failedStamps[4]; /* failed memebrs's stamps */
185
186} ArrayDescript;
187
179} ArrayDescript;
180
188/* report an error if ArrayDescript size exceed 512 */
189typedef char ArrayDescript_size_should_not_exceed_512[512-sizeof(ArrayDescript)];
190
191#pragma pack()
192
193/* Signature */
194#define HPT_ARRAY_V3 0x5a7816f3
195#ifdef ARRAY_V2_ONLY
196#define SAVE_FOR_RAID_INFO 0
197#else
198#define SAVE_FOR_RAID_INFO 10

--- 77 unchanged lines hidden ---
181#pragma pack()
182
183/* Signature */
184#define HPT_ARRAY_V3 0x5a7816f3
185#ifdef ARRAY_V2_ONLY
186#define SAVE_FOR_RAID_INFO 0
187#else
188#define SAVE_FOR_RAID_INFO 10

--- 77 unchanged lines hidden ---