From: Dan Williams <dan.j.williams@intel.com>
To: NeilBrown <neilb@suse.de>
Cc: "Labun, Marcin" <Marcin.Labun@intel.com>,
"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
"Ciechanowski, Ed" <ed.ciechanowski@intel.com>
Subject: Re: [PATCH] kill-subarray: fix, cannot kill-subarray with unsupported metadata
Date: Wed, 7 Sep 2011 17:16:42 -0700 [thread overview]
Message-ID: <CAA9_cmeB_NPE6w0aD0dhyEHi_ZJ8nexNzHgxbw42d29Odp2RWw@mail.gmail.com> (raw)
In-Reply-To: <20110907143111.499ae36e@notabene.brown>
On Tue, Sep 6, 2011 at 9:31 PM, NeilBrown <neilb@suse.de> wrote:
> On Tue, 6 Sep 2011 12:16:43 -0700 "Williams, Dan J"
> <dan.j.williams@intel.com> wrote:
>
>> On Mon, Sep 5, 2011 at 7:23 AM, Labun, Marcin <Marcin.Labun@intel.com> wrote:
>> > Subject: [PATCH] kill-subarray: fix, cannot kill-subarray with unsupported metadata
>> >
>> > container_content retrieves volume information from disks in the container.
>> > For unsupported volumes the function was not returning mdinfo. When all volumes
>> > were unsupported the function was returning NULL pointer to block actions on the volumes.
>>
>> Isn't this the purpose of ->ignore_hw_compat?
>>
>> So we could do something simpler like the following instead?
>>
>> diff --git a/Kill.c b/Kill.c
>> index b841a5b..11b27a6 100644
>> --- a/Kill.c
>> +++ b/Kill.c
>> @@ -97,7 +97,9 @@ int Kill_subarray(char *dev, char *subarray, int quiet)
>>
>> memset(st, 0, sizeof(*st));
>>
>> + st->ignore_hw_compat = 1;
>> fd = open_subarray(dev, subarray, st, quiet);
>> + st->ignore_hw_compat = 0;
>> if (fd < 0)
>> return 2;
>
> While that is a *much* nicer patch, I don't think it will actually address
> the problem.
> You would at least need container_content_imsm to ignore
> imsm_check_attributes if ->ignore_hw_compat was set.
>
> However I think things are getting a bit messy here and need to be cleaned up.
>
> Marcin's patch has the advantage that it treats the existence of a bad block
> log and incompatible attributes in much the same way.
> However I don't like:
> - the increase in number of magic flag bits
> - the editing of the list of arrays returned by container_content
> - the error messages being printed by super-intel.c
>
> I think I would like:
> - container_content always returns info about all arrays, so Examine and
> Kill can work properly
> - it sets a single flags (MD_SB_INVALID??) to say that the array cannot be
> assembled or manipulated, and maybe stored a message string in the 'info'
> so that common code can print it when it choses to ignore an array
> - common code checks and ignores MD_SB_INVALID arrays as needed rather than
> having them be removed from the list.
>
> Reasonable??
Yes, it would be nice to have a unified interface for reporting
"please, don't assemble this because: foo" while also giving as much
other info about the configuration as possible.
Where foo is:
"configuration crosses hardware domain boundary"
"platform/metadata is using feature X that mdadm does not support"
"raid array cannot be assembled without potentially exposing corrupted data"
Then --force can uniformly override those concerns, probably for
"Create" operations as well, but --force already has other meanings
there.
The ->ignore_hw_compat approach had the small beneficial side effect
of whitelisting approved usages of potentially invalid information,
but it should be no big deal to ensure those all get covered.
--
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
prev parent reply other threads:[~2011-09-08 0:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-05 14:23 [PATCH] kill-subarray: fix, cannot kill-subarray with unsupported metadata Labun, Marcin
2011-09-06 19:16 ` Williams, Dan J
2011-09-07 4:31 ` NeilBrown
2011-09-08 0:16 ` Dan Williams [this message]
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=CAA9_cmeB_NPE6w0aD0dhyEHi_ZJ8nexNzHgxbw42d29Odp2RWw@mail.gmail.com \
--to=dan.j.williams@intel.com \
--cc=Marcin.Labun@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).