From: Neil Brown <neilb@suse.de>
To: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
Cc: linux-raid@vger.kernel.org, wojciech.neubauer@intel.com,
adam.kwolek@intel.com, dan.j.williams@intel.com,
ed.ciechanowski@intel.com
Subject: Re: [PATCH 03/13] Manage: allow manual control of external raid0 readonly flag
Date: Tue, 23 Nov 2010 15:08:22 +1100 [thread overview]
Message-ID: <20101123150822.32e0322a@notabene.brown> (raw)
In-Reply-To: <20101118092145.29508.68627.stgit@gklab-170-111.igk.intel.com>
On Thu, 18 Nov 2010 10:21:45 +0100
Krzysztof Wojcik <krzysztof.wojcik@intel.com> wrote:
> From: Dan Williams <dan.j.williams@intel.com>
>
> mdadm --readwrite <subarray> will clear the external readonly flag ('-'
> to '/'), but only for redudant arrays. Allow raid0 arrays as well so
> the user has a simple helper to control this flag.
>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> Manage.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/Manage.c b/Manage.c
> index 6e9d4a0..ac9415b 100644
> --- a/Manage.c
> +++ b/Manage.c
> @@ -56,7 +56,6 @@ int Manage_ro(char *devname, int fd, int readonly)
> mdi = sysfs_read(fd, -1, GET_LEVEL|GET_VERSION);
> if (mdi &&
> mdi->array.major_version == -1 &&
> - mdi->array.level > 0 &&
> is_subarray(mdi->text_version)) {
> char vers[64];
> strcpy(vers, "external:");
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
I've added:
diff --git a/Manage.c b/Manage.c
index 919dc01..a203ec9 100644
--- a/Manage.c
+++ b/Manage.c
@@ -87,6 +87,8 @@ int Manage_ro(char *devname, int fd, int readonly)
if (*cp)
*cp = 0;
ping_monitor(vers+10);
+ if (mdi->array.level <= 0)
+ sysfs_set_str(mdi, NULL, "array_state", "active");
}
return 0;
}
so that you can set raid0 to --readonly again. Yell if you think that is
wrong.
NeilBrown
next prev parent reply other threads:[~2010-11-23 4:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-18 9:21 [PATCH 00/13] Series short description Krzysztof Wojcik
2010-11-18 9:21 ` [PATCH 01/13] Provide a mdstat_ent to subarray helper Krzysztof Wojcik
2010-11-18 9:21 ` [PATCH 02/13] block monitor: freeze spare assignment for external arrays Krzysztof Wojcik
2010-11-23 4:03 ` Neil Brown
2010-11-18 9:21 ` [PATCH 03/13] Manage: allow manual control of external raid0 readonly flag Krzysztof Wojcik
2010-11-23 4:08 ` Neil Brown [this message]
2010-11-18 9:21 ` [PATCH 04/13] Grow: mark some functions static Krzysztof Wojcik
2010-11-18 9:22 ` [PATCH 05/13] Assemble: fix assembly in the delta_disks > max_degraded case Krzysztof Wojcik
2010-11-18 9:22 ` [PATCH 06/13] Grow: fix check for raid6 layout normalization Krzysztof Wojcik
2010-11-18 9:22 ` [PATCH 07/13] Grow: add missing raid4 geometries to geo_map() Krzysztof Wojcik
2010-11-23 4:16 ` Neil Brown
2010-11-18 9:22 ` [PATCH 08/13] fix a get_linux_version() comparison typo Krzysztof Wojcik
2010-11-18 9:22 ` [PATCH 09/13] Create: cleanup/unify default geometry handling Krzysztof Wojcik
2010-11-18 9:22 ` [PATCH 10/13] Initialize st->devnum and st->container_dev in super_by_fd Krzysztof Wojcik
2010-11-18 9:22 ` [PATCH 11/13] Document the external reshape implementation Krzysztof Wojcik
2010-11-23 4:52 ` Neil Brown
2010-11-18 9:22 ` [PATCH 12/13] External reshape (step 1): container reshape and ->reshape_super() Krzysztof Wojcik
2010-11-23 5:22 ` Neil Brown
2010-11-18 9:23 ` [PATCH 13/13] External reshape (step 2): Freeze container Krzysztof Wojcik
2010-11-23 6:11 ` Neil Brown
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=20101123150822.32e0322a@notabene.brown \
--to=neilb@suse.de \
--cc=adam.kwolek@intel.com \
--cc=dan.j.williams@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=krzysztof.wojcik@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=wojciech.neubauer@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).