Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs
md_p.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  mdp_device_descriptor_s
 
struct  mdp_superblock_s
 
struct  mdp_superblock_1
 

Macros

#define MD_RESERVED_BYTES   (64 * 1024)
 
#define MD_RESERVED_SECTORS   (MD_RESERVED_BYTES / 512)
 
#define MD_NEW_SIZE_SECTORS(x)   ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
 
#define MD_SB_BYTES   4096
 
#define MD_SB_WORDS   (MD_SB_BYTES / 4)
 
#define MD_SB_SECTORS   (MD_SB_BYTES / 512)
 
#define MD_SB_GENERIC_OFFSET   0
 
#define MD_SB_PERSONALITY_OFFSET   64
 
#define MD_SB_DISKS_OFFSET   128
 
#define MD_SB_DESCRIPTOR_OFFSET   992
 
#define MD_SB_GENERIC_CONSTANT_WORDS   32
 
#define MD_SB_GENERIC_STATE_WORDS   32
 
#define MD_SB_GENERIC_WORDS   (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS)
 
#define MD_SB_PERSONALITY_WORDS   64
 
#define MD_SB_DESCRIPTOR_WORDS   32
 
#define MD_SB_DISKS   27
 
#define MD_SB_DISKS_WORDS   (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS)
 
#define MD_SB_RESERVED_WORDS   (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)
 
#define MD_SB_EQUAL_WORDS   (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS)
 
#define MD_DISK_FAULTY   0 /* disk is faulty / operational */
 
#define MD_DISK_ACTIVE   1 /* disk is running or spare disk */
 
#define MD_DISK_SYNC   2 /* disk is in sync with the raid set */
 
#define MD_DISK_REMOVED   3 /* disk is in sync with the raid set */
 
#define MD_DISK_WRITEMOSTLY
 
#define MD_SB_MAGIC   0xa92b4efc
 
#define MD_SB_CLEAN   0
 
#define MD_SB_ERRORS   1
 
#define MD_SB_BITMAP_PRESENT   8 /* bitmap may be present nearby */
 
#define MD_SUPERBLOCK_1_TIME_SEC_MASK   ((1ULL<<40) - 1)
 
#define WriteMostly1   1 /* mask for writemostly flag in above */
 
#define MD_FEATURE_BITMAP_OFFSET   1
 
#define MD_FEATURE_RECOVERY_OFFSET
 
#define MD_FEATURE_RESHAPE_ACTIVE   4
 
#define MD_FEATURE_BAD_BLOCKS   8 /* badblock list is not empty */
 
#define MD_FEATURE_REPLACEMENT
 
#define MD_FEATURE_RESHAPE_BACKWARDS
 
#define MD_FEATURE_NEW_OFFSET   64 /* new_offset must be honoured */
 
#define MD_FEATURE_ALL
 

Typedefs

typedef struct
mdp_device_descriptor_s 
mdp_disk_t
 
typedef struct mdp_superblock_s mdp_super_t
 

Macro Definition Documentation

#define MD_DISK_ACTIVE   1 /* disk is running or spare disk */

Definition at line 77 of file md_p.h.

#define MD_DISK_FAULTY   0 /* disk is faulty / operational */

Definition at line 76 of file md_p.h.

#define MD_DISK_REMOVED   3 /* disk is in sync with the raid set */

Definition at line 79 of file md_p.h.

#define MD_DISK_SYNC   2 /* disk is in sync with the raid set */

Definition at line 78 of file md_p.h.

#define MD_DISK_WRITEMOSTLY
Value:
9 /* disk is "write-mostly" is RAID1 config.
* read requests will only be sent here in
* dire need
*/

Definition at line 81 of file md_p.h.

#define MD_FEATURE_ALL
#define MD_FEATURE_BAD_BLOCKS   8 /* badblock list is not empty */

Definition at line 277 of file md_p.h.

#define MD_FEATURE_BITMAP_OFFSET   1

Definition at line 274 of file md_p.h.

#define MD_FEATURE_NEW_OFFSET   64 /* new_offset must be honoured */

Definition at line 280 of file md_p.h.

#define MD_FEATURE_RECOVERY_OFFSET
Value:
2 /* recovery_offset is present and
* must be honoured
*/

Definition at line 275 of file md_p.h.

#define MD_FEATURE_REPLACEMENT
Value:
16 /* This device is replacing an
* active device with same 'role'.
* 'recovery_offset' is also set.
*/

Definition at line 278 of file md_p.h.

#define MD_FEATURE_RESHAPE_ACTIVE   4

Definition at line 276 of file md_p.h.

#define MD_FEATURE_RESHAPE_BACKWARDS
Value:
32 /* Reshape doesn't change number
* of devices, but is going
* backwards anyway.
*/

Definition at line 279 of file md_p.h.

#define MD_NEW_SIZE_SECTORS (   x)    ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)

Definition at line 49 of file md_p.h.

#define MD_RESERVED_BYTES   (64 * 1024)

Definition at line 46 of file md_p.h.

#define MD_RESERVED_SECTORS   (MD_RESERVED_BYTES / 512)

Definition at line 47 of file md_p.h.

#define MD_SB_BITMAP_PRESENT   8 /* bitmap may be present nearby */

Definition at line 100 of file md_p.h.

#define MD_SB_BYTES   4096

Definition at line 51 of file md_p.h.

#define MD_SB_CLEAN   0

Definition at line 97 of file md_p.h.

#define MD_SB_DESCRIPTOR_OFFSET   992

Definition at line 61 of file md_p.h.

#define MD_SB_DESCRIPTOR_WORDS   32

Definition at line 67 of file md_p.h.

#define MD_SB_DISKS   27

Definition at line 68 of file md_p.h.

#define MD_SB_DISKS_OFFSET   128

Definition at line 60 of file md_p.h.

#define MD_SB_DISKS_WORDS   (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS)

Definition at line 69 of file md_p.h.

#define MD_SB_EQUAL_WORDS   (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS)

Definition at line 71 of file md_p.h.

#define MD_SB_ERRORS   1

Definition at line 98 of file md_p.h.

#define MD_SB_GENERIC_CONSTANT_WORDS   32

Definition at line 63 of file md_p.h.

#define MD_SB_GENERIC_OFFSET   0

Definition at line 58 of file md_p.h.

#define MD_SB_GENERIC_STATE_WORDS   32

Definition at line 64 of file md_p.h.

#define MD_SB_GENERIC_WORDS   (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS)

Definition at line 65 of file md_p.h.

#define MD_SB_MAGIC   0xa92b4efc

Definition at line 92 of file md_p.h.

#define MD_SB_PERSONALITY_OFFSET   64

Definition at line 59 of file md_p.h.

#define MD_SB_PERSONALITY_WORDS   64

Definition at line 66 of file md_p.h.

#define MD_SB_RESERVED_WORDS   (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)

Definition at line 70 of file md_p.h.

#define MD_SB_SECTORS   (MD_SB_BYTES / 512)

Definition at line 53 of file md_p.h.

#define MD_SB_WORDS   (MD_SB_BYTES / 4)

Definition at line 52 of file md_p.h.

#define MD_SUPERBLOCK_1_TIME_SEC_MASK   ((1ULL<<40) - 1)

Definition at line 196 of file md_p.h.

#define WriteMostly1   1 /* mask for writemostly flag in above */

Definition at line 247 of file md_p.h.

Typedef Documentation