History

Merge branch 'md-next' into md-linus

Shaohua Li committed 9 years ago

Commit e265eb32 parents 85724ed b50633526 files · +3582 −1483Browse files

Showing the changes to include/uapi/linux (1 of 26 files). Show all

Unified · Split

include/uapi/linux/raid/md_p.h+41−4
@@ -242,10 +242,18 @@ struct mdp_superblock_1 { · 241 unmodified lines
242 242
243 __le32 chunksize; /* in 512byte sectors */243 __le32 chunksize; /* in 512byte sectors */
244 __le32 raid_disks;244 __le32 raid_disks;
245 __le32 bitmap_offset; /* sectors after start of superblock that bitmap starts245 union {
246 * NOTE: signed, so bitmap can be before superblock246 __le32 bitmap_offset; /* sectors after start of superblock that bitmap starts
247 * only meaningful of feature_map[0] is set.247 * NOTE: signed, so bitmap can be before superblock
248 */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 /* These are only valid with feature bit '4' */258 /* These are only valid with feature bit '4' */
251 __le32 new_level; /* new level we are reshaping to */259 __le32 new_level; /* new level we are reshaping to */
@@ -318,6 +326,7 @@ struct mdp_superblock_1 { · 66 unmodified lines
318 */326 */
319#define MD_FEATURE_CLUSTERED 256 /* clustered MD */327#define MD_FEATURE_CLUSTERED 256 /* clustered MD */
320#define MD_FEATURE_JOURNAL 512 /* support write cache */328#define MD_FEATURE_JOURNAL 512 /* support write cache */
329#define MD_FEATURE_PPL 1024 /* support PPL */
321#define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \330#define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \
322 |MD_FEATURE_RECOVERY_OFFSET \331 |MD_FEATURE_RECOVERY_OFFSET \
323 |MD_FEATURE_RESHAPE_ACTIVE \332 |MD_FEATURE_RESHAPE_ACTIVE \
@@ -328,6 +337,7 @@ struct mdp_superblock_1 { · 4 unmodified lines
328 |MD_FEATURE_RECOVERY_BITMAP \337 |MD_FEATURE_RECOVERY_BITMAP \
329 |MD_FEATURE_CLUSTERED \338 |MD_FEATURE_CLUSTERED \
330 |MD_FEATURE_JOURNAL \339 |MD_FEATURE_JOURNAL \
340 |MD_FEATURE_PPL \
331 )341 )
332 342
333struct r5l_payload_header {343struct r5l_payload_header {
@@ -388,4 +398,31 @@ struct r5l_meta_block { · 54 unmodified lines
388 398
389#define R5LOG_VERSION 0x1399#define R5LOG_VERSION 0x1
390#define R5LOG_MAGIC 0x6433c509400#define R5LOG_MAGIC 0x6433c509
401
402struct 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
418struct 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#endif428#endif