mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 05:36:10 +00:00
Fix an overflow problem which prevented revive from working on plexes
of more than 4 GB. Reported by: dg
This commit is contained in:
parent
2267af789e
commit
acf3160e71
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42361
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue