Lines Matching +full:512 +full:- +full:bytes
1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
4 Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman
25 * We currently use 4096 bytes as follows:
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.
38 * If x is the real device size in bytes, we return an apparent size of:
40 * y = (x & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES
45 #define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512)
47 #define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
51 #define MD_SB_SECTORS (MD_SB_BYTES / 512)
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…
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 */
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
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 */
182 __u32 new_chunk; /* 17 new chunk size (bytes) */
183 __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 18];
189 __u32 chunk_size; /* 1 chunk size in bytes */
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.
222 * total size: 256 bytes plus 2 per device.
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) */
238 __le64 size; /* used size of component devices, in 512byte sectors */
240 __le32 chunksize; /* in 512byte sectors */
257 __le64 reshape_position; /* next address in array-space for reshape */
260 __le32 new_chunk; /* new chunk size (512byte sectors) */
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 */
297 * 2 bytes per device
298 * Note there are no per-device state flags. State information is rolled
325 #define MD_FEATURE_JOURNAL 512 /* support write cache */
379 __le32 size; /* flush_stripes size, bytes */
396 __le64 position; /* sector, start from rdev->data_offset, current position */
413 #define PPL_HDR_RESERVED 512
415 (PPL_HEADER_SIZE - PPL_HDR_RESERVED - 4 * sizeof(__le32) - sizeof(__le64))