From 61ad910569f9b613a93e75284b8265b6044170b4 Mon Sep 17 00:00:00 2001 From: grog Date: Wed, 6 Jan 1999 23:11:29 +0000 Subject: [PATCH] Fix an overflow problem which prevented revive from working on plexes of more than 4 GB. Reported by: dg --- sys/dev/vinum/vinumrevive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/vinum/vinumrevive.c b/sys/dev/vinum/vinumrevive.c index 1ecee9fa98f8..3339e426fdfa 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 */