X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=md_p.h;h=358a28ce3fcff3be791712848c41402d835e79cd;hb=9cd39f015558dba82c293a4433b481b921ceec87;hp=0d691fbc987dc3bd9a0845a8c63d7af40cd925c7;hpb=cc1799c3ddc99454903a8591bb27f30505bcd2dc;p=thirdparty%2Fmdadm.git diff --git a/md_p.h b/md_p.h index 0d691fbc..358a28ce 100644 --- a/md_p.h +++ b/md_p.h @@ -89,6 +89,7 @@ * read requests will only be sent here in * dire need */ +#define MD_DISK_FAILFAST 10 /* Fewer retries, more failures */ #define MD_DISK_REPLACEMENT 17 #define MD_DISK_JOURNAL 18 /* disk is used as the write journal in RAID-5/6 */ @@ -266,4 +267,29 @@ struct r5l_meta_block { #define R5LOG_VERSION 0x1 #define R5LOG_MAGIC 0x6433c509 +struct ppl_header_entry { + __u64 data_sector; /* raid sector of the new data */ + __u32 pp_size; /* length of partial parity */ + __u32 data_size; /* length of data */ + __u32 parity_disk; /* member disk containing parity */ + __u32 checksum; /* checksum of this entry's partial parity */ +} __attribute__ ((__packed__)); + +#define PPL_HEADER_SIZE 4096 +#define PPL_HDR_RESERVED 512 +#define PPL_HDR_ENTRY_SPACE \ + (PPL_HEADER_SIZE - PPL_HDR_RESERVED - 4 * sizeof(__u32) - sizeof(__u64)) +#define PPL_HDR_MAX_ENTRIES \ + (PPL_HDR_ENTRY_SPACE / sizeof(struct ppl_header_entry)) + +struct ppl_header { + __u8 reserved[PPL_HDR_RESERVED];/* reserved space, fill with 0xff */ + __u32 signature; /* signature (family number of volume) */ + __u32 padding; /* zero pad */ + __u64 generation; /* generation number of the header */ + __u32 entries_count; /* number of entries in entry array */ + __u32 checksum; /* checksum of the header */ + struct ppl_header_entry entries[PPL_HDR_MAX_ENTRIES]; +} __attribute__ ((__packed__)); + #endif