diff options
author | grog <grog@FreeBSD.org> | 1998-11-02 04:10:19 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1998-11-02 04:10:19 +0000 |
commit | dac500a9622b6e82e3e860f5340bf9fb6804894f (patch) | |
tree | d1627813052d05b2d7880f3221a1a3035733d6c4 | |
parent | b7c6c26d5ae2740c585aff6b24d4bc856f56b794 (diff) | |
download | FreeBSD-src-dac500a9622b6e82e3e860f5340bf9fb6804894f.zip FreeBSD-src-dac500a9622b6e82e3e860f5340bf9fb6804894f.tar.gz |
Get the default revive blocksize right for striped and RAID-5 plexes
-rw-r--r-- | lkm/vinum/revive.c | 7 | ||||
-rw-r--r-- | sys/dev/vinum/vinumrevive.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lkm/vinum/revive.c b/lkm/vinum/revive.c index 216dc48..2d93524 100644 --- a/lkm/vinum/revive.c +++ b/lkm/vinum/revive.c @@ -33,7 +33,7 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: revive.c,v 1.1.1.1 1998/09/16 05:56:21 grog Exp $ + * $Id: revive.c,v 1.3 1998/10/30 00:56:38 grog Exp grog $ */ #define REALLYKERNEL @@ -51,12 +51,13 @@ revive_block(int plexno) struct plex *plex = &PLEX[plexno]; struct buf *bp; int error = EAGAIN; - int size; + int size; /* size of revive block, bytes */ int s; /* priority level */ if (plex->revive_blocksize == 0) { if (plex->stripesize != 0) /* we're striped, don't revive more than */ - plex->revive_blocksize = min(DEFAULT_REVIVE_BLOCKSIZE, plex->stripesize); /* one block at a time */ + plex->revive_blocksize = min(DEFAULT_REVIVE_BLOCKSIZE, /* one block at a time */ + plex->stripesize << DEV_BSHIFT); else plex->revive_blocksize = DEFAULT_REVIVE_BLOCKSIZE; } diff --git a/sys/dev/vinum/vinumrevive.c b/sys/dev/vinum/vinumrevive.c index 216dc48..2d93524 100644 --- a/sys/dev/vinum/vinumrevive.c +++ b/sys/dev/vinum/vinumrevive.c @@ -33,7 +33,7 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: revive.c,v 1.1.1.1 1998/09/16 05:56:21 grog Exp $ + * $Id: revive.c,v 1.3 1998/10/30 00:56:38 grog Exp grog $ */ #define REALLYKERNEL @@ -51,12 +51,13 @@ revive_block(int plexno) struct plex *plex = &PLEX[plexno]; struct buf *bp; int error = EAGAIN; - int size; + int size; /* size of revive block, bytes */ int s; /* priority level */ if (plex->revive_blocksize == 0) { if (plex->stripesize != 0) /* we're striped, don't revive more than */ - plex->revive_blocksize = min(DEFAULT_REVIVE_BLOCKSIZE, plex->stripesize); /* one block at a time */ + plex->revive_blocksize = min(DEFAULT_REVIVE_BLOCKSIZE, /* one block at a time */ + plex->stripesize << DEV_BSHIFT); else plex->revive_blocksize = DEFAULT_REVIVE_BLOCKSIZE; } |