Return MD_SB_CLUSTERED if mddev is clustered
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Wed, 26 Nov 2014 18:22:03 +0000 (12:22 -0600)
committerGoldwyn Rodrigues <rgoldwyn@suse.com>
Mon, 23 Feb 2015 13:28:43 +0000 (07:28 -0600)
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
drivers/md/md.c
include/uapi/linux/raid/md_p.h

index 3387f940140bcbdeb0ee8cba958cec0499c310dc..5ed57688e5c5109d32f607618194c1dd0e9937f3 100644 (file)
@@ -5634,6 +5634,9 @@ static int get_array_info(struct mddev *mddev, void __user *arg)
                info.state = (1<<MD_SB_CLEAN);
        if (mddev->bitmap && mddev->bitmap_info.offset)
                info.state |= (1<<MD_SB_BITMAP_PRESENT);
+       if (mddev_is_clustered(mddev))
+               info.state |= (1<<MD_SB_CLUSTERED);
+
        info.active_disks  = insync;
        info.working_disks = working;
        info.failed_disks  = failed;
index 49f4210d4394fb837a567f3f241f9b33be4351fd..643489d33e6812a138e7632d121167d614e4edf1 100644 (file)
@@ -101,6 +101,7 @@ typedef struct mdp_device_descriptor_s {
 #define MD_SB_CLEAN            0
 #define MD_SB_ERRORS           1
 
+#define        MD_SB_CLUSTERED         5 /* MD is clustered */
 #define        MD_SB_BITMAP_PRESENT    8 /* bitmap may be present nearby */
 
 /*