diff options
author | mckusick <mckusick@FreeBSD.org> | 2000-03-17 03:44:47 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2000-03-17 03:44:47 +0000 |
commit | a02c1c5b8ad086b49d1c3ef4236efbf07662aceb (patch) | |
tree | a2e29590d9b5f379d0af87b141e57a81570b243c /sys/ufs/ffs | |
parent | c1a1c736a75b08b88b083b78e5ca96c026d8e20a (diff) | |
download | FreeBSD-src-a02c1c5b8ad086b49d1c3ef4236efbf07662aceb.zip FreeBSD-src-a02c1c5b8ad086b49d1c3ef4236efbf07662aceb.tar.gz |
Use 64-bit math to calculate if we have hit our freespace limit.
Necessary for coherent results on filesystems bigger than 0.5Tb.
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/fs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h index 91979d8..d93f2a7 100644 --- a/sys/ufs/ffs/fs.h +++ b/sys/ufs/ffs/fs.h @@ -479,7 +479,8 @@ struct ocg { */ #define freespace(fs, percentreserved) \ (blkstofrags((fs), (fs)->fs_cstotal.cs_nbfree) + \ - (fs)->fs_cstotal.cs_nffree - ((fs)->fs_dsize * (percentreserved) / 100)) + (fs)->fs_cstotal.cs_nffree - \ + ((off_t)((fs)->fs_dsize) * (percentreserved) / 100)) /* * Determining the size of a file block in the file system. |