From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: neilb@suse.de
Cc: lzhong@suse.com, linux-raid@vger.kernel.org
Subject: [PATCH 07/24] Return MD_SB_CLUSTERED if mddev is clustered
Date: Thu, 18 Dec 2014 10:16:38 -0600 [thread overview]
Message-ID: <20141218161638.GA29601@shrek.lan> (raw)
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
drivers/md/md.c | 3 +++
include/uapi/linux/raid/md_p.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 795d925..5f45951 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5630,6 +5630,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;
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h
index 49f4210..643489d 100644
--- a/include/uapi/linux/raid/md_p.h
+++ b/include/uapi/linux/raid/md_p.h
@@ -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 */
/*
--
2.1.2
reply other threads:[~2014-12-18 16:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141218161638.GA29601@shrek.lan \
--to=rgoldwyn@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=lzhong@suse.com \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox