Fix fsbtodb() for UFS1. This fixes an overflow for file sizes >1 TB,

allowing for sizes up to 4 TB.  This doesn't affect UFS2 since b is already
a 64 bit type, coincidental with daddr_t.

Submitted by:	bde
This commit is contained in:
njl 2004-10-09 20:16:06 +00:00
parent 379f33f67e
commit 8b9984e218

View File

@ -486,7 +486,7 @@ struct cg {
* Turn filesystem block numbers into disk block addresses.
* This maps filesystem blocks to device size blocks.
*/
#define fsbtodb(fs, b) ((b) << (fs)->fs_fsbtodb)
#define fsbtodb(fs, b) ((daddr_t)(b) << (fs)->fs_fsbtodb)
#define dbtofsb(fs, b) ((b) >> (fs)->fs_fsbtodb)
/*