mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-16 21:15:10 -05:00
Merge branch 'md-next' into md-linus
This commit is contained in:
@@ -242,10 +242,18 @@ struct mdp_superblock_1 {
|
||||
|
||||
__le32 chunksize; /* in 512byte sectors */
|
||||
__le32 raid_disks;
|
||||
__le32 bitmap_offset; /* sectors after start of superblock that bitmap starts
|
||||
* NOTE: signed, so bitmap can be before superblock
|
||||
* only meaningful of feature_map[0] is set.
|
||||
*/
|
||||
union {
|
||||
__le32 bitmap_offset; /* sectors after start of superblock that bitmap starts
|
||||
* NOTE: signed, so bitmap can be before superblock
|
||||
* only meaningful of feature_map[0] is set.
|
||||
*/
|
||||
|
||||
/* only meaningful when feature_map[MD_FEATURE_PPL] is set */
|
||||
struct {
|
||||
__le16 offset; /* sectors from start of superblock that ppl starts (signed) */
|
||||
__le16 size; /* ppl size in sectors */
|
||||
} ppl;
|
||||
};
|
||||
|
||||
/* These are only valid with feature bit '4' */
|
||||
__le32 new_level; /* new level we are reshaping to */
|
||||
@@ -318,6 +326,7 @@ struct mdp_superblock_1 {
|
||||
*/
|
||||
#define MD_FEATURE_CLUSTERED 256 /* clustered MD */
|
||||
#define MD_FEATURE_JOURNAL 512 /* support write cache */
|
||||
#define MD_FEATURE_PPL 1024 /* support PPL */
|
||||
#define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \
|
||||
|MD_FEATURE_RECOVERY_OFFSET \
|
||||
|MD_FEATURE_RESHAPE_ACTIVE \
|
||||
@@ -328,6 +337,7 @@ struct mdp_superblock_1 {
|
||||
|MD_FEATURE_RECOVERY_BITMAP \
|
||||
|MD_FEATURE_CLUSTERED \
|
||||
|MD_FEATURE_JOURNAL \
|
||||
|MD_FEATURE_PPL \
|
||||
)
|
||||
|
||||
struct r5l_payload_header {
|
||||
@@ -388,4 +398,31 @@ struct r5l_meta_block {
|
||||
|
||||
#define R5LOG_VERSION 0x1
|
||||
#define R5LOG_MAGIC 0x6433c509
|
||||
|
||||
struct ppl_header_entry {
|
||||
__le64 data_sector; /* raid sector of the new data */
|
||||
__le32 pp_size; /* length of partial parity */
|
||||
__le32 data_size; /* length of data */
|
||||
__le32 parity_disk; /* member disk containing parity */
|
||||
__le32 checksum; /* checksum of partial parity data for this
|
||||
* entry (~crc32c) */
|
||||
} __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(__le32) - sizeof(__le64))
|
||||
#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 */
|
||||
__le32 signature; /* signature (family number of volume) */
|
||||
__le32 padding; /* zero pad */
|
||||
__le64 generation; /* generation number of the header */
|
||||
__le32 entries_count; /* number of entries in entry array */
|
||||
__le32 checksum; /* checksum of the header (~crc32c) */
|
||||
struct ppl_header_entry entries[PPL_HDR_MAX_ENTRIES];
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user