From: Neil Brown <neilb@suse.de>
To: "Czarnowska, Anna" <anna.czarnowska@intel.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
"Hawrylewicz Czarnowski,
Przemyslaw" <przemyslaw.hawrylewicz.czarnowski@intel.com>,
"Labun, Marcin" <Marcin.Labun@intel.com>,
"Neubauer, Wojciech" <Wojciech.Neubauer@intel.com>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"Ciechanowski, Ed" <ed.ciechanowski@intel.com>,
"dledford@redhat.com" <dledford@redhat.com>
Subject: Re: [PATCH 20/33] Added disk util functions
Date: Tue, 6 Jul 2010 16:55:10 +1000 [thread overview]
Message-ID: <20100706165510.34483a05@notabene.brown> (raw)
In-Reply-To: <A9DE54D0CD747C4CB06DCE5B6FA2246FDA893C3E@irsmsx504.ger.corp.intel.com>
On Mon, 5 Jul 2010 10:34:29 +0100
"Czarnowska, Anna" <anna.czarnowska@intel.com> wrote:
> Needed for checking suitability of a disk to use for rebuild.
>
>
>
> Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com<mailto:anna.czarnowska@intel.com>>
>
> ---
>
> mdadm.h | 11 +++++++++++
>
> super-ddf.c | 36 ++++++++++++++++++++++++++++++++++++
>
> super-intel.c | 31 +++++++++++++++++++++++++++++++
>
> util.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> 4 files changed, 133 insertions(+), 0 deletions(-)
>
>
>
> diff --git a/mdadm.h b/mdadm.h
>
> index b6d7933..86f5370 100644
>
> --- a/mdadm.h
>
> +++ b/mdadm.h
>
> @@ -277,6 +277,12 @@ enum special_options {
>
> DetailPlatform,
>
> };
>
>
>
> +enum disk_status {
>
> + unknown,
>
> + spare_disk,
>
> + failed_disk,
>
> +};
>
> +
>
> enum domain_actions {
>
> ignore,
>
> incremental,
>
> @@ -656,6 +662,8 @@ extern struct superswitch {
>
> int (*load_super)(struct supertype *st, int fd, char *devname);
>
> struct supertype * (*match_metadata_desc)(char *arg);
>
> __u64 (*avail_size)(struct supertype *st, __u64 size);
>
> +
>
> + enum disk_status (*get_disk_status)(struct supertype *st, int major,
>
> +int minor);
I don't like the idea of identifying a device by major/minor in this context.
This disk_status information should all be loaded by 'load_super'.
i.e. we call 'load_super' giving an 'fd' for the container, and it loads all
the relevant details. Then Monitor just looks through the mdinfo that was
loaded to find out the status of each device.
If the required status isn't currently available in mdinfo, we should change
load_super to put it there.
Thanks,
NeilBrown
prev parent reply other threads:[~2010-07-06 6:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <A9DE54D0CD747C4CB06DCE5B6FA2246FDA893C3E@irsmsx504.ger.corp.intel.com>
2010-07-05 10:47 ` [PATCH 20/33] Added disk util functions Hawrylewicz Czarnowski, Przemyslaw
2010-07-06 6:55 ` Neil Brown [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=20100706165510.34483a05@notabene.brown \
--to=neilb@suse.de \
--cc=Marcin.Labun@intel.com \
--cc=Wojciech.Neubauer@intel.com \
--cc=anna.czarnowska@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dledford@redhat.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=przemyslaw.hawrylewicz.czarnowski@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).