/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1994, 2000 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mhd_local.h"
#include <stropts.h>
#include "ff.h"
/*
* manipulate failfast driver
*/
/*
* disarm failfast
*/
int
)
{
/* check locks */
/* ignore not open */
return (0);
/* disarm any existing failfast */
/* return success */
return (0);
}
/*
* open failfast
*/
int
)
{
/* check locks */
/* open if not already */
}
/* disarm any existing failfast */
return (-1);
/* load setname */
/* load failfast mode */
switch (sp->sr_ff_mode) {
case MHD_FF_DEBUG:
break;
case MHD_FF_HALT:
break;
default:
assert(0);
/* FALLTHROUGH */
case MHD_FF_PANIC:
break;
}
/* return success */
return (0);
}
/*
* close failfast
*/
int
)
{
int rval = 0;
/* check locks */
/* ignore not open */
return (0);
/* disarm any existing failfast */
rval = -1;
/* close device */
/* return success */
return (rval);
}
/*
* reset failfast
*/
int
)
{
/* check locks */
/* if timeout is 0, disarm */
if (ff == 0)
/* rearm failfast */
/* return success */
return (0);
}
/*
* die right now
*/
void
)
{
/* check locks */
/* rearm failfast for now */
mhd_perror("/dev/ff");
}
/*
* check set and reset failfast
*/
void
)
{
/* check locks */
/* see how many drives are within alloted time */
continue;
++cnt;
MHDPRINTF2(("%s: now %llu dr_time %llu diff %llu ff %llu\n",
++ok;
}
/* check for majority */
return;
}
/* die */
mhd_eprintf("%s: failed majority cnt %d ok %d\n",
mhd_ff_die(sp);
}