linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pawel Baldysiak <pawel.baldysiak@intel.com>
To: jes.sorensen@redhat.com
Cc: linux-raid@vger.kernel.org, Pawel Baldysiak <pawel.baldysiak@intel.com>
Subject: [PATCH] IMSM: Enable spanning between VMD domains
Date: Fri, 21 Oct 2016 11:37:50 +0200	[thread overview]
Message-ID: <1477042671-12934-3-git-send-email-pawel.baldysiak@intel.com> (raw)
In-Reply-To: <1477042671-12934-1-git-send-email-pawel.baldysiak@intel.com>

Each VMD domain adds additional PCI domain. This patch
enables RAID creation with NVMe drives from different
VMD domains.

Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
---
 super-intel.c | 19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index f52e3d4..6fc9cb1 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -567,10 +567,6 @@ static int attach_hba_to_super(struct intel_super *super, struct sys_dev *device
 	if (device->type != hba->type)
 		return 2;
 
-	/* Always forbid spanning between VMD domains (seen as different controllers by mdadm) */
-	if (device->type == SYS_DEV_VMD && !path_attached_to_hba(device->path, hba->path))
-		return 2;
-
 	/* Multiple same type HBAs can be used if they share the same OROM */
 	const struct imsm_orom *device_orom = get_orom_by_device_id(device->dev_id);
 
@@ -2023,10 +2019,10 @@ static int detail_platform_imsm(int verbose, int enumerate_only, char *controlle
 
 	for (entry = orom_entries; entry; entry = entry->next) {
 		if (entry->type == SYS_DEV_VMD) {
+			print_imsm_capability(&entry->orom);
 			for (hba = list; hba; hba = hba->next) {
 				if (hba->type == SYS_DEV_VMD) {
 					char buf[PATH_MAX];
-					print_imsm_capability(&entry->orom);
 					printf(" I/O Controller : %s (%s)\n",
 						vmd_domain_to_controller(hba, buf), get_sys_dev_type(hba->type));
 					if (print_vmd_attached_devs(hba)) {
@@ -2034,9 +2030,9 @@ static int detail_platform_imsm(int verbose, int enumerate_only, char *controlle
 							pr_err("failed to get devices attached to VMD domain.\n");
 						result |= 2;
 					}
-					printf("\n");
 				}
 			}
+			printf("\n");
 			continue;
 		}
 
@@ -5999,14 +5995,6 @@ count_volumes(struct intel_hba *hba, int dpa, int verbose)
 		else
 			return 0;
 
-		/* VMD has one orom entry for all domain, but spanning is not allowed.
-		 * VMD arrays should be counted per domain (controller), so skip
-		 * domains that are not the given one.
-		 */
-		if (hba->type == SYS_DEV_VMD &&
-		   (strncmp(device->path, hba->path, strlen(device->path)) != 0))
-			continue;
-
 		devlist = get_devices(hba_path);
 		/* if no intel devices return zero volumes */
 		if (devlist == NULL)
@@ -9268,8 +9256,7 @@ int validate_container_imsm(struct mdinfo *info)
 			return 1;
 		}
 
-		if (orom != orom2 ||
-		    (hba->type == SYS_DEV_VMD && hba != hba2)) {
+		if (orom != orom2) {
 			pr_err("WARNING - IMSM container assembled with disks under different HBAs!\n"
 				"       This operation is not supported and can lead to data loss.\n");
 			return 1;
-- 
2.7.4


  parent reply	other threads:[~2016-10-21  9:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21  9:37 [PATCH] IMSM: Add warning message when x8-type device is used Pawel Baldysiak
2016-10-21  9:37 ` [PATCH] IMSM: Do not update metadata if not able to migrate Pawel Baldysiak
2016-10-21  9:37 ` Pawel Baldysiak [this message]
2016-10-26 16:03   ` [PATCH] IMSM: Enable spanning between VMD domains Jes Sorensen
2016-10-21  9:37 ` [PATCH] Lib.c: Fix geting devname for devices with long path Pawel Baldysiak
2016-10-26 16:03   ` Jes Sorensen
2016-10-21 12:47 ` [PATCH] IMSM: Add warning message when x8-type device is used Jes Sorensen
2016-10-21 14:17   ` Baldysiak, Pawel
2016-10-21 14:22     ` Jes Sorensen

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=1477042671-12934-3-git-send-email-pawel.baldysiak@intel.com \
    --to=pawel.baldysiak@intel.com \
    --cc=jes.sorensen@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    /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).