diff options
author | mav <mav@FreeBSD.org> | 2013-01-14 00:38:51 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2013-01-14 00:38:51 +0000 |
commit | 257051502affd96323d9712fa882d51ff3ac4538 (patch) | |
tree | d6b179253426b2cd2ddfee6471414bab58b0e320 /sys/geom/raid | |
parent | 44f703ac3d31dd511c7634ef7390ce623d29629c (diff) | |
download | FreeBSD-src-257051502affd96323d9712fa882d51ff3ac4538.zip FreeBSD-src-257051502affd96323d9712fa882d51ff3ac4538.tar.gz |
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.
Diffstat (limited to 'sys/geom/raid')
-rw-r--r-- | sys/geom/raid/md_intel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/geom/raid/md_intel.c b/sys/geom/raid/md_intel.c index 1f663bb..6b77aa5 100644 --- a/sys/geom/raid/md_intel.c +++ b/sys/geom/raid/md_intel.c @@ -1150,7 +1150,7 @@ g_raid_md_intel_start(struct g_raid_softc *sc) 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_object *md, struct g_raid_volume *tvol, 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) |