Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2013 22:27:31 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r246183 - stable/8/sys/geom/raid
Message-ID:  <201301312227.r0VMRVc0051920@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Jan 31 22:27:31 2013
New Revision: 246183
URL: http://svnweb.freebsd.org/changeset/base/246183

Log:
  MFC r245400:
  Windows driver writes relative volume IDs to metadata field.  Use that value
  as a hint for raid/rX device number to make it persistent across reboots.

Modified:
  stable/8/sys/geom/raid/md_intel.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/geom/   (props changed)

Modified: stable/8/sys/geom/raid/md_intel.c
==============================================================================
--- stable/8/sys/geom/raid/md_intel.c	Thu Jan 31 22:26:48 2013	(r246182)
+++ stable/8/sys/geom/raid/md_intel.c	Thu Jan 31 22:27:31 2013	(r246183)
@@ -1150,7 +1150,7 @@ g_raid_md_intel_start(struct g_raid_soft
 	for (i = 0; i < meta->total_volumes; i++) {
 		mvol = intel_get_volume(meta, i);
 		mmap = intel_get_map(mvol, 0);
-		vol = g_raid_create_volume(sc, mvol->name, -1);
+		vol = g_raid_create_volume(sc, mvol->name, mvol->tid - 1);
 		pv = malloc(sizeof(*pv), M_MD_INTEL, M_WAITOK | M_ZERO);
 		pv->pv_volume_pos = i;
 		pv->pv_cng = (mvol->state & INTEL_ST_CLONE_N_GO) != 0;
@@ -2352,6 +2352,7 @@ g_raid_md_write_intel(struct g_raid_md_o
 		mvol->total_sectors = vol->v_mediasize / sectorsize;
 		mvol->state = (INTEL_ST_READ_COALESCING |
 		    INTEL_ST_WRITE_COALESCING);
+		mvol->tid = vol->v_global_id + 1;
 		if (pv->pv_cng) {
 			mvol->state |= INTEL_ST_CLONE_N_GO;
 			if (pv->pv_cng_man_sync)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301312227.r0VMRVc0051920>