diff options
Diffstat (limited to 'include/uapi/linux/raid')
| -rw-r--r-- | include/uapi/linux/raid/md_p.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h index a5f54ff26c20..96e4196f9c79 100644 --- a/include/uapi/linux/raid/md_p.h +++ b/include/uapi/linux/raid/md_p.h | |||
| @@ -324,4 +324,62 @@ struct mdp_superblock_1 { | |||
| 324 | |MD_FEATURE_CLUSTERED \ | 324 | |MD_FEATURE_CLUSTERED \ |
| 325 | ) | 325 | ) |
| 326 | 326 | ||
| 327 | struct r5l_payload_header { | ||
| 328 | __le16 type; | ||
| 329 | __le16 flags; | ||
| 330 | } __attribute__ ((__packed__)); | ||
| 331 | |||
| 332 | enum r5l_payload_type { | ||
| 333 | R5LOG_PAYLOAD_DATA = 0, | ||
| 334 | R5LOG_PAYLOAD_PARITY = 1, | ||
| 335 | R5LOG_PAYLOAD_FLUSH = 2, | ||
| 336 | }; | ||
| 337 | |||
| 338 | struct r5l_payload_data_parity { | ||
| 339 | struct r5l_payload_header header; | ||
| 340 | __le32 size; /* sector. data/parity size. each 4k | ||
| 341 | * has a checksum */ | ||
| 342 | __le64 location; /* sector. For data, it's raid sector. For | ||
| 343 | * parity, it's stripe sector */ | ||
| 344 | __le32 checksum[]; | ||
| 345 | } __attribute__ ((__packed__)); | ||
| 346 | |||
| 347 | enum r5l_payload_data_parity_flag { | ||
| 348 | R5LOG_PAYLOAD_FLAG_DISCARD = 1, /* payload is discard */ | ||
| 349 | /* | ||
| 350 | * RESHAPED/RESHAPING is only set when there is reshape activity. Note, | ||
| 351 | * both data/parity of a stripe should have the same flag set | ||
| 352 | * | ||
| 353 | * RESHAPED: reshape is running, and this stripe finished reshape | ||
| 354 | * RESHAPING: reshape is running, and this stripe isn't reshaped | ||
| 355 | */ | ||
| 356 | R5LOG_PAYLOAD_FLAG_RESHAPED = 2, | ||
| 357 | R5LOG_PAYLOAD_FLAG_RESHAPING = 3, | ||
| 358 | }; | ||
| 359 | |||
| 360 | struct r5l_payload_flush { | ||
| 361 | struct r5l_payload_header header; | ||
| 362 | __le32 size; /* flush_stripes size, bytes */ | ||
| 363 | __le64 flush_stripes[]; | ||
| 364 | } __attribute__ ((__packed__)); | ||
| 365 | |||
| 366 | enum r5l_payload_flush_flag { | ||
| 367 | R5LOG_PAYLOAD_FLAG_FLUSH_STRIPE = 1, /* data represents whole stripe */ | ||
| 368 | }; | ||
| 369 | |||
| 370 | struct r5l_meta_block { | ||
| 371 | __le32 magic; | ||
| 372 | __le32 checksum; | ||
| 373 | __u8 version; | ||
| 374 | __u8 __zero_pading_1; | ||
| 375 | __le16 __zero_pading_2; | ||
| 376 | __le32 meta_size; /* whole size of the block */ | ||
| 377 | |||
| 378 | __le64 seq; | ||
| 379 | __le64 position; /* sector, start from rdev->data_offset, current position */ | ||
| 380 | struct r5l_payload_header payloads[]; | ||
| 381 | } __attribute__ ((__packed__)); | ||
| 382 | |||
| 383 | #define R5LOG_VERSION 0x1 | ||
| 384 | #define R5LOG_MAGIC 0x6433c509 | ||
| 327 | #endif | 385 | #endif |
