History

md: superblock changes for PPL

Include information about PPL location and size into mdp_superblock_1 and copy it to/from rdev. Because PPL is mutually exclusive with bitmap, put it in place of 'bitmap_offset'. Add a new flag MD_FEATURE_PPL for 'feature_map', analogically to MD_FEATURE_BITMAP_OFFSET. Add MD_HAS_PPL to mddev->flags to indicate that PPL is enabled on an array.

Artur Paszkiewicz committed 9 years ago

Commit ea0213e1 parent effe6ee5 files · +45 −6Browse files

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

Unified · Split

include/uapi/linux/raid/md_p.h+14−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 {