diff options
author | grog <grog@FreeBSD.org> | 1999-01-06 23:11:29 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1999-01-06 23:11:29 +0000 |
commit | 61ad910569f9b613a93e75284b8265b6044170b4 (patch) | |
tree | 9a39778942656eab8c7c0e3dc10dad087f29eaaf | |
parent | 4666ac50272776168d29d2c4142de771daa30381 (diff) | |
download | FreeBSD-src-61ad910569f9b613a93e75284b8265b6044170b4.zip FreeBSD-src-61ad910569f9b613a93e75284b8265b6044170b4.tar.gz |
Fix an overflow problem which prevented revive from working on plexes
of more than 4 GB.
Reported by: dg
-rw-r--r-- | sys/dev/vinum/vinumrevive.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/vinum/vinumrevive.c b/sys/dev/vinum/vinumrevive.c index 1ecee9f..3339e42 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.5 1998/12/28 04:56:23 peter Exp $ + * $Id: vinumrevive.c,v 1.6 1998/12/28 16:28:23 peter Exp $ */ #define REALLYKERNEL @@ -62,7 +62,7 @@ revive_block(int plexno) else plex->revive_blocksize = DEFAULT_REVIVE_BLOCKSIZE; } - size = min(plex->revive_blocksize, (plex->length - plex->revived) << DEV_BSHIFT); + size = min(plex->revive_blocksize >> DEV_BSHIFT, plex->length - plex->revived) << DEV_BSHIFT; s = splbio(); /* Get a buffer */ |