*
* $Id: vinum.c,v 1.33 2001/01/09 06:19:15 grog Exp grog $
* $FreeBSD: src/sys/dev/vinum/vinum.c,v 1.38.2.3 2003/01/07 12:14:16 joerg Exp $
- * $DragonFly: src/sys/dev/raid/vinum/vinum.c,v 1.20 2007/05/15 22:44:12 dillon Exp $
*/
#define STATIC static /* nothing while we're testing XXX */
void
free_vinum(int cleardrive)
{
+ union daemoninfo di = { .nothing = 0 };
int i;
int drives_allocated = vinum_conf.drives_allocated;
}
while ((vinum_conf.flags & (VF_STOPPING | VF_DAEMONOPEN))
== (VF_STOPPING | VF_DAEMONOPEN)) { /* at least one daemon open, we're stopping */
- queue_daemon_request(daemonrq_return, (union daemoninfo) 0); /* stop the daemon */
+ queue_daemon_request(daemonrq_return, di); /* stop the daemon */
tsleep(&vinumclose, 0, "vstop", 1); /* and wait for it */
}
if (SD != NULL) {
*
* $Id: vinumdaemon.c,v 1.8 2000/01/03 05:22:03 grog Exp grog $
* $FreeBSD: src/sys/dev/vinum/vinumdaemon.c,v 1.16 2000/01/05 06:03:56 grog Exp $
- * $DragonFly: src/sys/dev/raid/vinum/vinumdaemon.c,v 1.12 2008/06/05 18:06:31 swildner Exp $
*/
#include "vinumhdr.h"
int
vinum_finddaemon(void)
{
+ union daemoninfo di = { .nothing = 0 };
int result;
if (daemonpid != 0) { /* we think we have a daemon, */
- queue_daemon_request(daemonrq_ping, (union daemoninfo) 0); /* queue a ping */
+ queue_daemon_request(daemonrq_ping, di); /* queue a ping */
result = tsleep(&vinum_finddaemon, 0, "reap", 2 * hz);
if (result == 0) /* yup, the daemon's up and running */
return 0;
*
* $Id: vinuminterrupt.c,v 1.12 2000/11/24 03:41:42 grog Exp grog $
* $FreeBSD: src/sys/dev/vinum/vinuminterrupt.c,v 1.25.2.3 2001/05/28 05:56:27 grog Exp $
- * $DragonFly: src/sys/dev/raid/vinum/vinuminterrupt.c,v 1.13 2007/08/01 11:46:46 swildner Exp $
*/
#include "vinumhdr.h"
void
complete_rqe(struct bio *bio)
{
+ union daemoninfo di;
struct buf *bp = bio->bio_buf;
struct rqelement *rqe;
struct request *rq;
if (rq->isplex) { /* plex operation, */
ubio->bio_buf->b_flags |= B_ERROR; /* yes, propagate to user */
ubio->bio_buf->b_error = rq->error;
- } else /* try to recover */
- queue_daemon_request(daemonrq_ioerror, (union daemoninfo) rq); /* let the daemon complete */
+ } else { /* try to recover */
+ di.rq = rq;
+ queue_daemon_request(daemonrq_ioerror, di); /* let the daemon complete */
+ }
} else {
ubio->bio_buf->b_resid = 0; /* completed our transfer */
if (rq->isplex == 0) /* volume request, */
*
* $Id: vinumio.c,v 1.30 2000/05/10 23:23:30 grog Exp grog $
* $FreeBSD: src/sys/dev/vinum/vinumio.c,v 1.52.2.6 2002/05/02 08:43:44 grog Exp $
- * $DragonFly: src/sys/dev/raid/vinum/vinumio.c,v 1.31 2008/06/05 18:06:31 swildner Exp $
*/
#include "vinumhdr.h"
void
save_config(void)
{
- queue_daemon_request(daemonrq_saveconfig, (union daemoninfo) 0);
+ union daemoninfo di = { .nothing = 0 };
+
+ queue_daemon_request(daemonrq_saveconfig, di);
}
/*
int
set_drive_state(int driveno, enum drivestate newstate, enum setstateflags flags)
{
+ union daemoninfo di;
struct drive *drive = &DRIVE[driveno];
int oldstate = drive->state;
int sdno;
if (newstate == drive_up) { /* want to bring it up */
if ((drive->flags & VF_OPEN) == 0) /* should be open, but we're not */
init_drive(drive, 1); /* which changes the state again */
- } else /* taking it down or worse */
- queue_daemon_request(daemonrq_closedrive, /* get the daemon to close it */
- (union daemoninfo) drive);
+ } else { /* taking it down or worse */
+ di.drive = drive;
+ queue_daemon_request(daemonrq_closedrive, di); /* get the daemon to close it */
+ }
if ((flags & setstate_configuring) == 0) /* configuring? */
save_config(); /* no: save the updated configuration now */
return 1;