From: Neil Brown <neilb@suse.de>
To: "Labun, Marcin" <Marcin.Labun@intel.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
"Neubauer, Wojciech" <Wojciech.Neubauer@intel.com>,
"Hawrylewicz Czarnowski,
Przemyslaw" <przemyslaw.hawrylewicz.czarnowski@intel.com>,
"Czarnowska, Anna" <anna.czarnowska@intel.com>,
"Williams, Dan J" <dan.j.williams@intel.com>
Subject: Re: [PATCH] Monitor: Check destination array domain early.
Date: Tue, 21 Dec 2010 09:07:33 +1100 [thread overview]
Message-ID: <20101221090733.74899aaa@notabene.brown> (raw)
In-Reply-To: <905EDD02F158D948B186911EB64DB3D176B9CF39@irsmsx503.ger.corp.intel.com>
On Fri, 17 Dec 2010 13:26:42 +0000 "Labun, Marcin" <Marcin.Labun@intel.com>
wrote:
> >From 868faba9b94b8278c93f9f8026b05fb698212207 Mon Sep 17 00:00:00 2001
> From: Marcin Labun <marcin.labun@intel.com>
> Date: Thu, 16 Dec 2010 15:16:12 +0100
> Subject: [PATCH] Monitor: Check destination array domain early.
>
> Destination arrays that do not have any domains are excluded
> from spare sharing. We can check it early, without searching
> for donor arrays.
Applied. Thanks.
NeilBrown
>
> Signed-off-by: Marcin Labun <marcin.labun@intel.com>
> ---
> Monitor.c | 14 ++++++++------
> 1 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/Monitor.c b/Monitor.c
> index ce160f3..e79f658 100644
> --- a/Monitor.c
> +++ b/Monitor.c
> @@ -767,8 +767,7 @@ static int move_spare(struct state *from, struct state *to,
> return 0;
> }
>
> -static int check_donor(struct state *from, struct state *to,
> - struct domainlist *domlist)
> +static int check_donor(struct state *from, struct state *to)
> {
> struct state *sub;
>
> @@ -790,8 +789,6 @@ static int check_donor(struct state *from, struct state *to,
> return 0;
> if (from->spare <= 0)
> return 0;
> - if (domlist == NULL)
> - return 0;
> return 1;
> }
>
> @@ -923,10 +920,15 @@ static void try_spare_migration(struct state *statelist, struct alert_info *info
> to->metadata->ss->name);
> if (to->spare_group)
> domain_add(&domlist, to->spare_group);
> -
> + /*
> + * No spare migration if the destination
> + * has no domain. Skip this array.
> + */
> + if (!domlist)
> + continue;
> for (from=statelist ; from ; from=from->next) {
> dev_t devid;
> - if (!check_donor(from, to, domlist))
> + if (!check_donor(from, to))
> continue;
> if (from->metadata->ss->external)
> devid = container_choose_spare(
prev parent reply other threads:[~2010-12-20 22:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 13:26 [PATCH] Monitor: Check destination array domain early Labun, Marcin
2010-12-20 22:07 ` 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=20101221090733.74899aaa@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=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).