From 28596d23465532a5b557f974987e18ffd33fc421 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 13 Jul 1997 15:13:07 +0000 Subject: [PATCH] Removed "hack to prevent overflow of a 32bit block number". Lite2 has a better hack in ffs_vfsops.c. The hack here restricted the maximum file size to 2^39 bytes (512GB). fs_bsize * 2^31 - 1 (16TB for the default blocksize of 8K) would have been better. There is no good way to remove this limit on old BSD4.4 file systems. --- sbin/newfs/mkfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index f36bcfdc5daf..c95183a3d260 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -127,8 +127,8 @@ int fsi, fso; int randinit; #endif daddr_t alloc(); -static int charsperline(); long calcipg(); +static int charsperline(); mkfs(pp, fsys, fi, fo) struct partition *pp; @@ -311,8 +311,6 @@ mkfs(pp, fsys, fi, fo) sizepb *= NINDIR(&sblock); sblock.fs_maxfilesize += sizepb; } - /* XXX - hack to prevent overflow of a 32bit block number */ - sblock.fs_maxfilesize = MIN(sblock.fs_maxfilesize, (u_quad_t) 1 << 39); /* * Validate specified/determined secpercyl * and calculate minimum cylinders per group.