From: NeilBrown <neilb@suse.de>
To: Marcin Tomczak <marcin.tomczak@intel.com>
Cc: linux-raid@vger.kernel.org, maciej.patelczyk@intel.com,
lukasz.dorau@intel.com
Subject: Re: [PATCH] imsm: Forbid spanning between multiple controllers.
Date: Mon, 19 Nov 2012 11:08:00 +1100 [thread overview]
Message-ID: <20121119110800.5ba2b63e@notabene.brown> (raw)
In-Reply-To: <20121109144636.2215.91684.stgit@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2349 bytes --]
On Fri, 09 Nov 2012 15:46:36 +0100 Marcin Tomczak <marcin.tomczak@intel.com>
wrote:
> Attaching disks to multiple controllers of the same type has been
> allowed so far. Now spanning between multiple controllers is disallowed
> at all by IMSM metadata.
>
> Signed-off-by: Marcin Tomczak <marcin.tomczak@intel.com>
> Reviewed-by: Lukasz Dorau <lukasz.dorau@intel.com>
> ---
> super-intel.c | 25 ++++++++-----------------
> 1 files changed, 8 insertions(+), 17 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 544cb05..db437b9 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -558,20 +558,11 @@ static int attach_hba_to_super(struct intel_super *super, struct sys_dev *device
> if (super->hba == NULL) {
> super->hba = alloc_intel_hba(device);
> return 1;
> - }
> -
> - hba = super->hba;
> - /* Intel metadata allows for all disks attached to the same type HBA.
> - * Do not sypport odf HBA types mixing
> - */
> - if (device->type != hba->type)
> + } else
> + /* IMSM metadata disallows to attach disks to multiple
> + * controllers.
> + */
> return 2;
> -
> - while (hba->next)
> - hba = hba->next;
> -
> - hba->next = alloc_intel_hba(device);
> - return 1;
> }
>
> static struct sys_dev* find_disk_attached_hba(int fd, const char *devname)
> @@ -3018,11 +3009,11 @@ static int compare_super_imsm(struct supertype *st, struct supertype *tst)
> */
> if (!check_env("IMSM_NO_PLATFORM")) {
> if (!first->hba || !sec->hba ||
> - (first->hba->type != sec->hba->type)) {
> + strcmp(first->hba->path, sec->hba->path) != 0) {
> fprintf(stderr,
> "HBAs of devices does not match %s != %s\n",
> - first->hba ? get_sys_dev_type(first->hba->type) : NULL,
> - sec->hba ? get_sys_dev_type(sec->hba->type) : NULL);
> + first->hba ? first->hba->path : NULL,
> + sec->hba ? sec->hba->path : NULL);
> return 3;
> }
> }
> @@ -3800,7 +3791,7 @@ static int find_intel_hba_capability(int fd, struct intel_super *super, char *de
> }
>
> fprintf(stderr, ").\n"
> - " Mixing devices attached to different controllers "
> + " Mixing devices attached to multiple controllers "
> "is not allowed.\n");
> }
> free_sys_dev(&hba_name);
>
applied, thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2012-11-19 0:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 14:46 [PATCH] imsm: Forbid spanning between multiple controllers Marcin Tomczak
2012-11-19 0:08 ` NeilBrown [this message]
2013-01-10 21:57 ` Phillip Susi
[not found] ` <8565BDA60DEA9E4C91B1047AD1958FBE1DEC8F5B@IRSMSX104.ger.corp.intel.com>
2013-01-14 14:45 ` Phillip Susi
2013-01-15 10:31 ` Patelczyk, Maciej
2013-01-15 14:57 ` Phillip Susi
2013-01-16 8:49 ` John Robinson
2013-01-16 9:58 ` Patelczyk, Maciej
2013-01-16 10:01 ` Patelczyk, Maciej
2013-01-16 14:26 ` Phillip Susi
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=20121119110800.5ba2b63e@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=lukasz.dorau@intel.com \
--cc=maciej.patelczyk@intel.com \
--cc=marcin.tomczak@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