svn commit: r218399 - projects/graid/head/sys/geom/raid
Alexander Motin
mav at FreeBSD.org
Mon Feb 7 14:58:30 UTC 2011
Author: mav
Date: Mon Feb 7 14:58:29 2011
New Revision: 218399
URL: http://svn.freebsd.org/changeset/base/218399
Log:
Update metadata pointer obsoleted by metadata write. This fixes unneeded
geom retaste call or possibly even panic.
Modified:
projects/graid/head/sys/geom/raid/md_intel.c
Modified: projects/graid/head/sys/geom/raid/md_intel.c
==============================================================================
--- projects/graid/head/sys/geom/raid/md_intel.c Mon Feb 7 11:20:58 2011 (r218398)
+++ projects/graid/head/sys/geom/raid/md_intel.c Mon Feb 7 14:58:29 2011 (r218399)
@@ -793,7 +793,7 @@ g_raid_md_intel_refill(struct g_raid_sof
struct intel_raid_conf *meta;
struct g_raid_disk *disk;
struct task *task;
- int update;
+ int update, na;
md = sc->sc_md;
mdi = (struct g_raid_md_intel_object *)md;
@@ -801,11 +801,12 @@ g_raid_md_intel_refill(struct g_raid_sof
update = 0;
do {
/* Make sure we miss anything. */
- if (g_raid_ndisks(sc, G_RAID_DISK_S_ACTIVE) ==
- meta->total_disks)
+ na = g_raid_ndisks(sc, G_RAID_DISK_S_ACTIVE);
+ if (na == meta->total_disks)
break;
- G_RAID_DEBUG(1, "Array is not complete, trying to refill.");
+ G_RAID_DEBUG(1, "Array is not complete (%d of %d), "
+ "trying to refill.", na, meta->total_disks);
/* Try to get use some of STALE disks. */
TAILQ_FOREACH(disk, &sc->sc_disks, d_next) {
@@ -829,8 +830,10 @@ g_raid_md_intel_refill(struct g_raid_sof
} while (disk != NULL);
/* Write new metadata if we changed something. */
- if (update)
+ if (update) {
g_raid_md_write_intel(md, NULL, NULL, NULL);
+ meta = mdi->mdio_meta;
+ }
/* Update status of our need for spare. */
mdi->mdio_incomplete = (g_raid_ndisks(sc, G_RAID_DISK_S_ACTIVE) <
More information about the svn-src-projects
mailing list