aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/raid
diff options
context:
space:
mode:
authorSong Liu <songliubraving@fb.com>2015-08-13 17:31:55 -0400
committerNeilBrown <neilb@suse.com>2015-10-24 02:16:18 -0400
commitbac624f3f86a8c7db395c7f85ccad6a504b9c4b4 (patch)
tree0b9240c0fb33d6adf4ddcfd85afd95321cc96552 /include/uapi/linux/raid
parentc4d4c91b44d8309082127893221a1971a27c50ca (diff)
MD: add a new disk role to present write journal device
Next patches will use a disk as raid5/6 journaling. We need a new disk role to present the journal device and add MD_FEATURE_JOURNAL to feature_map for backward compability. Signed-off-by: Song Liu <songliubraving@fb.com> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'include/uapi/linux/raid')
-rw-r--r--include/uapi/linux/raid/md_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h
index d1fc8a637368..eaaab52077a3 100644
--- a/include/uapi/linux/raid/md_p.h
+++ b/include/uapi/linux/raid/md_p.h
@@ -89,9 +89,11 @@
89 * read requests will only be sent here in 89 * read requests will only be sent here in
90 * dire need 90 * dire need
91 */ 91 */
92#define MD_DISK_JOURNAL 18 /* disk is used as the write journal in RAID-5/6 */
92 93
93#define MD_DISK_ROLE_SPARE 0xffff 94#define MD_DISK_ROLE_SPARE 0xffff
94#define MD_DISK_ROLE_FAULTY 0xfffe 95#define MD_DISK_ROLE_FAULTY 0xfffe
96#define MD_DISK_ROLE_JOURNAL 0xfffd
95#define MD_DISK_ROLE_MAX 0xff00 /* max value of regular disk role */ 97#define MD_DISK_ROLE_MAX 0xff00 /* max value of regular disk role */
96 98
97typedef struct mdp_device_descriptor_s { 99typedef struct mdp_device_descriptor_s {
@@ -307,6 +309,7 @@ struct mdp_superblock_1 {
307 * is guided by bitmap. 309 * is guided by bitmap.
308 */ 310 */
309#define MD_FEATURE_CLUSTERED 256 /* clustered MD */ 311#define MD_FEATURE_CLUSTERED 256 /* clustered MD */
312#define MD_FEATURE_JOURNAL 512 /* support write cache */
310#define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ 313#define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \
311 |MD_FEATURE_RECOVERY_OFFSET \ 314 |MD_FEATURE_RECOVERY_OFFSET \
312 |MD_FEATURE_RESHAPE_ACTIVE \ 315 |MD_FEATURE_RESHAPE_ACTIVE \