diff options
author | grog <grog@FreeBSD.org> | 1999-10-13 03:21:04 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1999-10-13 03:21:04 +0000 |
commit | 27e8167b0fe57631329f4ed86dcd411beacee971 (patch) | |
tree | 4d24da04b92f059ebddf5d7bc66a788bf0a5a260 | |
parent | 14c5b40d4bcd80b795729c83d92e2cf4f8b8a480 (diff) | |
download | FreeBSD-src-27e8167b0fe57631329f4ed86dcd411beacee971.zip FreeBSD-src-27e8167b0fe57631329f4ed86dcd411beacee971.tar.gz |
Add glue for passing revive block size, and also for initializing a
subdisk.
-rw-r--r-- | sys/dev/vinum/vinumstate.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/vinum/vinumstate.c b/sys/dev/vinum/vinumstate.c index 2e52f6c..5f30213 100644 --- a/sys/dev/vinum/vinumstate.c +++ b/sys/dev/vinum/vinumstate.c @@ -37,6 +37,7 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * + * $Id: vinumstate.c,v 2.13 1999/10/12 04:38:48 grog Exp grog $ * $FreeBSD$ */ @@ -856,15 +857,20 @@ start_object(struct vinum_ioctl_msg *data) case sd_object: if (SD[objindex].state == sd_reviving) { /* reviving, */ + if (data->blocksize) + SD[objindex].revive_blocksize = data->blocksize; ioctl_reply->error = revive_block(objindex); /* revive another block */ ioctl_reply->msg[0] = '\0'; /* no comment */ return; + } else if (SD[objindex].state == sd_initializing) { /* initializing, */ + if (data->blocksize) + SD[objindex].init_blocksize = data->blocksize; + ioctl_reply->error = initsd(objindex, data->verify); /* initialize another block */ + ioctl_reply->msg[0] = '\0'; /* no comment */ + return; } status = set_sd_state(objindex, sd_up, flags); /* set state */ - if (status == EAGAIN) { /* first revive, */ - ioctl_reply->error = revive_block(objindex); /* revive the first block */ - ioctl_reply->error = EAGAIN; - } else { + if (status != EAGAIN) { /* not first revive or initialize, */ if (SD[objindex].state != sd_up) /* set status on whether we really did it */ ioctl_reply->error = EBUSY; else |