PERFORCE change 124887 for review
Ulf Lilleengen
lulf at FreeBSD.org
Wed Aug 8 02:41:27 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=124887
Change 124887 by lulf at 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
More information about the p4-projects
mailing list