Date: Wed, 8 Aug 2007 09:41:25 GMT From: Ulf Lilleengen <lulf@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 124887 for review Message-ID: <200708080941.l789fPoL026174@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=124887 Change 124887 by lulf@lulf_carrot on 2007/08/08 09:41:18 - Remember to remove subdisk from a drives subdisk list when a drive is lost. Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_events.c#11 edit Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_events.c#11 (text+ko) ==== @@ -157,7 +157,7 @@ { struct g_consumer *cp; struct gv_drive *d2; - struct gv_sd *s; + struct gv_sd *s, *s2; struct gv_freelist *fl, *fl2; gv_set_drive_state(d, GV_DRIVE_DOWN, @@ -195,8 +195,11 @@ d->freelist_entries = 0; d->sdcount = 0; - LIST_FOREACH(s, &d->subdisks, from_drive) + /* Put the subdisk in tasted mode, and remove from drive list. */ + LIST_FOREACH_SAFE(s, &d->subdisks, from_drive, s2) { + LIST_REMOVE(s, from_drive); s->flags |= GV_SD_TASTED; + } /* * Don't forget that gv_is_newer wants a "real" drive at the beginning
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708080941.l789fPoL026174>