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
242242
243243 __le32 chunksize; /* in 512byte sectors */
244244 __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+ };
249257
250258 /* These are only valid with feature bit '4' */
251259 __le32 new_level; /* new level we are reshaping to */
@@ -318,6 +326,7 @@ struct mdp_superblock_1 { · 66 unmodified lines
318326 */
319327 #define MD_FEATURE_CLUSTERED 256 /* clustered MD */
320328 #define MD_FEATURE_JOURNAL 512 /* support write cache */
329+#define MD_FEATURE_PPL 1024 /* support PPL */
321330 #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \
322331 |MD_FEATURE_RECOVERY_OFFSET \
323332 |MD_FEATURE_RESHAPE_ACTIVE \
@@ -328,6 +337,7 @@ struct mdp_superblock_1 { · 4 unmodified lines
328337 |MD_FEATURE_RECOVERY_BITMAP \
329338 |MD_FEATURE_CLUSTERED \
330339 |MD_FEATURE_JOURNAL \
340+ |MD_FEATURE_PPL \
331341 )
332342
333343 struct r5l_payload_header {