aboutsummaryrefslogtreecommitdiff
path: root/sys/ufs
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2000-03-17 03:44:47 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2000-03-17 03:44:47 +0000
commit584508a741222593fa122d7245ebec15c11b8994 (patch)
tree52f8cc1e1ad55822557a5346d8ccf79adba8c95d /sys/ufs
parenta9f9141ca5f267d059649f9d30a70dbfbef75d2d (diff)
downloadsrc-584508a741222593fa122d7245ebec15c11b8994.tar.gz
src-584508a741222593fa122d7245ebec15c11b8994.zip
Use 64-bit math to calculate if we have hit our freespace limit.
Necessary for coherent results on filesystems bigger than 0.5Tb.
Notes
Notes: svn path=/head/; revision=58155
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/fs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h
index 91979d87cefc..d93f2a72b9dd 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.