Go to the documentation of this file.
18 #include <linux/types.h>
46 #define MD_RESERVED_BYTES (64 * 1024)
47 #define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512)
49 #define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
51 #define MD_SB_BYTES 4096
52 #define MD_SB_WORDS (MD_SB_BYTES / 4)
53 #define MD_SB_SECTORS (MD_SB_BYTES / 512)
58 #define MD_SB_GENERIC_OFFSET 0
59 #define MD_SB_PERSONALITY_OFFSET 64
60 #define MD_SB_DISKS_OFFSET 128
61 #define MD_SB_DESCRIPTOR_OFFSET 992
63 #define MD_SB_GENERIC_CONSTANT_WORDS 32
64 #define MD_SB_GENERIC_STATE_WORDS 32
65 #define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS)
66 #define MD_SB_PERSONALITY_WORDS 64
67 #define MD_SB_DESCRIPTOR_WORDS 32
68 #define MD_SB_DISKS 27
69 #define MD_SB_DISKS_WORDS (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS)
70 #define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)
71 #define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS)
76 #define MD_DISK_FAULTY 0
77 #define MD_DISK_ACTIVE 1
78 #define MD_DISK_SYNC 2
79 #define MD_DISK_REMOVED 3
81 #define MD_DISK_WRITEMOSTLY 9
95 #define MD_SB_MAGIC 0xa92b4efc
100 #define MD_SB_CLEAN 0
101 #define MD_SB_ERRORS 1
103 #define MD_SB_BITMAP_PRESENT 8
199 #define MD_SUPERBLOCK_1_TIME_SEC_MASK ((1ULL<<40) - 1)
250 #define WriteMostly1 1
277 #define MD_FEATURE_BITMAP_OFFSET 1
278 #define MD_FEATURE_RECOVERY_OFFSET 2
281 #define MD_FEATURE_RESHAPE_ACTIVE 4
282 #define MD_FEATURE_BAD_BLOCKS 8
283 #define MD_FEATURE_REPLACEMENT 16
287 #define MD_FEATURE_RESHAPE_BACKWARDS 32
291 #define MD_FEATURE_NEW_OFFSET 64
292 #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \
293 |MD_FEATURE_RECOVERY_OFFSET \
294 |MD_FEATURE_RESHAPE_ACTIVE \
295 |MD_FEATURE_BAD_BLOCKS \
296 |MD_FEATURE_REPLACEMENT \
297 |MD_FEATURE_RESHAPE_BACKWARDS \
298 |MD_FEATURE_NEW_OFFSET \