Showing the changes to include/uapi/linux (1 of 26 files). Show all
Unified · Split
| @@ -242,10 +242,18 @@ struct mdp_superblock_1 { · 241 unmodified lines | ||
| 242 | 242 | |
| 243 | 243 | __le32 chunksize; /* in 512byte sectors */ |
| 244 | 244 | __le32 raid_disks; |
| 245 | − __le32 bitmap_offset; /* sectors after start of superblock that bitmap starts | |
| 246 | − * NOTE: signed, so bitmap can be before superblock | |
| 247 | − * only meaningful of feature_map[0] is set. | |
| 248 | − */ | |
| 245 | + union { | |
| 246 | + __le32 bitmap_offset; /* sectors after start of superblock that bitmap starts | |
| 247 | + * NOTE: signed, so bitmap can be before superblock | |
| 248 | + * only meaningful of feature_map[0] is set. | |
| 249 | + */ | |
| 250 | + | |
| 251 | + /* only meaningful when feature_map[MD_FEATURE_PPL] is set */ | |
| 252 | + struct { | |
| 253 | + __le16 offset; /* sectors from start of superblock that ppl starts (signed) */ | |
| 254 | + __le16 size; /* ppl size in sectors */ | |
| 255 | + } ppl; | |
| 256 | + }; | |
| 249 | 257 | |
| 250 | 258 | /* These are only valid with feature bit '4' */ |
| 251 | 259 | __le32 new_level; /* new level we are reshaping to */ |
| @@ -318,6 +326,7 @@ struct mdp_superblock_1 { · 66 unmodified lines | ||
| 318 | 326 | */ |
| 319 | 327 | #define MD_FEATURE_CLUSTERED 256 /* clustered MD */ |
| 320 | 328 | #define MD_FEATURE_JOURNAL 512 /* support write cache */ |
| 329 | +#define MD_FEATURE_PPL 1024 /* support PPL */ | |
| 321 | 330 | #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ |
| 322 | 331 | |MD_FEATURE_RECOVERY_OFFSET \ |
| 323 | 332 | |MD_FEATURE_RESHAPE_ACTIVE \ |
| @@ -328,6 +337,7 @@ struct mdp_superblock_1 { · 4 unmodified lines | ||
| 328 | 337 | |MD_FEATURE_RECOVERY_BITMAP \ |
| 329 | 338 | |MD_FEATURE_CLUSTERED \ |
| 330 | 339 | |MD_FEATURE_JOURNAL \ |
| 340 | + |MD_FEATURE_PPL \ | |
| 331 | 341 | ) |
| 332 | 342 | |
| 333 | 343 | struct r5l_payload_header { |
| @@ -388,4 +398,31 @@ struct r5l_meta_block { · 54 unmodified lines | ||
| 388 | 398 | |
| 389 | 399 | #define R5LOG_VERSION 0x1 |
| 390 | 400 | #define R5LOG_MAGIC 0x6433c509 |
| 401 | + | |
| 402 | +struct ppl_header_entry { | |
| 403 | + __le64 data_sector; /* raid sector of the new data */ | |
| 404 | + __le32 pp_size; /* length of partial parity */ | |
| 405 | + __le32 data_size; /* length of data */ | |
| 406 | + __le32 parity_disk; /* member disk containing parity */ | |
| 407 | + __le32 checksum; /* checksum of partial parity data for this | |
| 408 | + * entry (~crc32c) */ | |
| 409 | +} __attribute__ ((__packed__)); | |
| 410 | + | |
| 411 | +#define PPL_HEADER_SIZE 4096 | |
| 412 | +#define PPL_HDR_RESERVED 512 | |
| 413 | +#define PPL_HDR_ENTRY_SPACE \ | |
| 414 | + (PPL_HEADER_SIZE - PPL_HDR_RESERVED - 4 * sizeof(__le32) - sizeof(__le64)) | |
| 415 | +#define PPL_HDR_MAX_ENTRIES \ | |
| 416 | + (PPL_HDR_ENTRY_SPACE / sizeof(struct ppl_header_entry)) | |
| 417 | + | |
| 418 | +struct ppl_header { | |
| 419 | + __u8 reserved[PPL_HDR_RESERVED];/* reserved space, fill with 0xff */ | |
| 420 | + __le32 signature; /* signature (family number of volume) */ | |
| 421 | + __le32 padding; /* zero pad */ | |
| 422 | + __le64 generation; /* generation number of the header */ | |
| 423 | + __le32 entries_count; /* number of entries in entry array */ | |
| 424 | + __le32 checksum; /* checksum of the header (~crc32c) */ | |
| 425 | + struct ppl_header_entry entries[PPL_HDR_MAX_ENTRIES]; | |
| 426 | +} __attribute__ ((__packed__)); | |
| 427 | + | |
| 391 | 428 | #endif |