mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
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:
parent
93962a3a50
commit
894d8d3c03
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136336
@ -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)
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user