Skip to content

Commit

Permalink
Return MD_SB_CLUSTERED if mddev is clustered
Browse files Browse the repository at this point in the history
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
  • Loading branch information
Goldwyn Rodrigues committed Feb 23, 2015
1 parent c4ce867 commit ca8895d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions include/uapi/linux/raid/md_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

/*
Expand Down

0 comments on commit ca8895d

Please sign in to comment.