From 26b459873685b6c14c9edea598dfeee03367e9d8 Mon Sep 17 00:00:00 2001 From: oster Date: Sat, 27 May 2000 20:29:14 +0000 Subject: Components which match on everything but the mod_counter are renegades, and must be handled correctly. In particular, they should be added to their old auto-config set, but then immediately released. Failing to do otherwise means that they potentialy end up in a different (and competing!) RAID set which may auto-configure in place of the correct one, and cause all sorts of chaos at auto-configure time. --- sys/dev/raidframe/rf_netbsdkintf.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'sys/dev/raidframe') diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 3d998941751..ba244006697 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.81 2000/05/27 19:12:03 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.82 2000/05/27 20:29:14 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -2842,9 +2842,28 @@ rf_create_auto_sets(ac_list) cset = config_sets; while(cset!=NULL) { if (rf_does_it_fit(cset, ac)) { - /* looks like it matches */ - ac->next = cset->ac; - cset->ac = ac; + /* looks like it matches... how about + the mod_counter? */ + + if (cset->ac->clabel->mod_counter == + ac->clabel->mod_counter) { + ac->next = cset->ac; + cset->ac = ac; + } else { + /* else we ignore this, as + it used to belong to a + valid set, but is no + longer in sync. It's + effectively a renegade, + and we don't want to add + it *anywhere*. Close it, + and carry on. + */ + VOP_CLOSE(ac->vp, FREAD, + NOCRED, 0); + vput(ac->vp); + + } break; } cset = cset->next; -- cgit