aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/raid
diff options
context:
space:
mode:
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>2017-03-09 03:59:57 -0500
committerShaohua Li <shli@fb.com>2017-03-16 19:55:53 -0400
commitea0213e0c7cc1c1b52badf27bd7db4f50a67baaa (patch)
treecc45803ce7ac13964e38403e03f9ea06559fa5e0 /include/uapi/linux/raid
parenteffe6ee7523aa50d0517bd7da141e112b44d89fa (diff)
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. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'include/uapi/linux/raid')
-rw-r--r--include/uapi/linux/raid/md_p.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h
index 9930f3e9040f..fe2112810c43 100644
--- a/include/uapi/linux/raid/md_p.h
+++ b/include/uapi/linux/raid/md_p.h
@@ -242,10 +242,18 @@ struct mdp_superblock_1 {
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 starts 245 union {
246 * NOTE: signed, so bitmap can be before superblock 246 __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 {
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 {
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 {