Lines Matching +full:add +full:- +full:disk
1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
4 Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman
29 * 0 - 31 Constant generic RAID device information.
30 * 32 - 63 Generic state information.
31 * 64 - 127 Personality specific information.
32 * 128 - 511 12 32-words descriptors of the disks in the raid set.
33 * 512 - 911 Reserved.
34 * 912 - 1023 Disk specific descriptor.
40 * y = (x & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES
47 #define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
54 * The following are counted in 32-bit words
68 #define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_W…
74 #define MD_DISK_FAULTY 0 /* disk is faulty / operational */
75 #define MD_DISK_ACTIVE 1 /* disk is running or spare disk */
76 #define MD_DISK_SYNC 2 /* disk is in sync with the raid set */
77 #define MD_DISK_REMOVED 3 /* disk is in sync with the raid set */
78 #define MD_DISK_CLUSTER_ADD 4 /* Initiate a disk add across the cluster
81 #define MD_DISK_CANDIDATE 5 /* disk is added as spare (local) until confirmed
85 * devices available - and don't try to
89 #define MD_DISK_WRITEMOSTLY 9 /* disk is "write-mostly" is RAID1 config.
93 #define MD_DISK_JOURNAL 18 /* disk is used as the write journal in RAID-5/6 */
98 #define MD_DISK_ROLE_MAX 0xff00 /* max value of regular disk role */
106 __u32 reserved[MD_SB_DESCRIPTOR_WORDS - 5];
122 * - if an array is being reshaped (restriped) in order to change
125 * be the "new - old". So if +ve, raid_disks is the new value, and
126 * "raid_disks-delta_disks" is the old. If -ve, raid_disks is the
143 __u32 size; /* 8 Apparent size of each individual disk */
151 __u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS - 16];
164 __u32 events_hi; /* 7 high-order of superblock update count */
165 __u32 events_lo; /* 8 low-order of superblock update count */
166 __u32 cp_events_hi; /* 9 high-order of checkpoint update count */
167 __u32 cp_events_lo; /* 10 low-order of checkpoint update count */
169 __u32 events_lo; /* 7 low-order of superblock update count */
170 __u32 events_hi; /* 8 high-order of superblock update count */
171 __u32 cp_events_lo; /* 9 low-order of checkpoint update count */
172 __u32 cp_events_hi; /* 10 high-order of checkpoint update count */
178 __u64 reshape_position; /* 12,13 next address in array-space for reshape */
183 __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 18];
192 __u32 pstate_reserved[MD_SB_PERSONALITY_WORDS - 4];
212 __u64 ev = sb->events_hi; in md_event()
213 return (ev<<32)| sb->events_lo; in md_event()
216 #define MD_SUPERBLOCK_1_TIME_SEC_MASK ((1ULL<<40) - 1)
219 * The version-1 superblock :
220 * All numeric fields are little-endian.
226 /* constant array information - 128 bytes */
227 __le32 magic; /* MD_SB_MAGIC: 0xa92b4efc - little endian */
232 __u8 set_uuid[16]; /* user-space generated. */
233 char set_name[32]; /* set and interpreted by user-space */
236 __le32 level; /* 0,1,4,5, -1 (linear) */
257 __le64 reshape_position; /* next address in array-space for reshape */
261 __le32 new_offset; /* signed number to add to data_offset in new
262 * layout. 0 == no-change. This can be
266 /* constant this-device information - 64 bytes */
274 __le32 dev_number; /* permanent identifier of this device - not role in raid */
275 __le32 cnt_corrected_read; /* number of read errors that were corrected by re-writing */
276 __u8 device_uuid[16]; /* user-space setable, ignored by kernel */
277 __u8 devflags; /* per-device flags. Only two defined...*/
281 * If offset and size are non-zero, that space is reserved and available
286 * signed - not unsigned */
288 /* array state information - 64 bytes */
294 __u8 pad3[64-32]; /* set to 0 when writing */
298 * Note there are no per-device state flags. State information is rolled
396 __le64 position; /* sector, start from rdev->data_offset, current position */
407 __le32 parity_disk; /* member disk containing parity */
415 (PPL_HEADER_SIZE - PPL_HDR_RESERVED - 4 * sizeof(__le32) - sizeof(__le64))