summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-06-26 18:34:51 +0000
committeriedowse <iedowse@FreeBSD.org>2002-06-26 18:34:51 +0000
commitc0323a07fb64ca28dea948838fdbcdfb6567eec8 (patch)
treefd006436ff99e2e311741b91f06697f4c2d9ecee /sys
parentc8f207f89f5cbbfd10791f54508afe1be8f5ea6e (diff)
downloadFreeBSD-src-c0323a07fb64ca28dea948838fdbcdfb6567eec8.zip
FreeBSD-src-c0323a07fb64ca28dea948838fdbcdfb6567eec8.tar.gz
Remove the kernel file-size limit for UFS2, so that only the limit
imposed by the filesystem structure itself remains. With 16k blocks, the maximum file size is now just over 128TB. For now, the UFS1 file size limit is left unchanged so as to remain consistent with RELENG_4, but it too could be removed in the future. Reviewed by: mckusick
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index f3fe627..61cec1f 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -853,10 +853,12 @@ ffs_oldfscompat_read(fs, ump, sblockloc)
fs->fs_qbmask = ~fs->fs_bmask;
fs->fs_qfmask = ~fs->fs_fmask;
}
- ump->um_savedmaxfilesize = fs->fs_maxfilesize;
- maxfilesize = (u_int64_t)0x40000000 * fs->fs_bsize - 1;
- if (fs->fs_maxfilesize > maxfilesize)
- fs->fs_maxfilesize = maxfilesize;
+ if (fs->fs_magic == FS_UFS1_MAGIC) {
+ ump->um_savedmaxfilesize = fs->fs_maxfilesize;
+ maxfilesize = (u_int64_t)0x40000000 * fs->fs_bsize - 1;
+ if (fs->fs_maxfilesize > maxfilesize)
+ fs->fs_maxfilesize = maxfilesize;
+ }
/* Compatibility for old filesystems */
if (fs->fs_avgfilesize <= 0)
fs->fs_avgfilesize = AVFILESIZ;
@@ -890,8 +892,8 @@ ffs_oldfscompat_write(fs, ump)
fs->fs_old_cstotal.cs_nbfree = fs->fs_cstotal.cs_nbfree;
fs->fs_old_cstotal.cs_nifree = fs->fs_cstotal.cs_nifree;
fs->fs_old_cstotal.cs_nffree = fs->fs_cstotal.cs_nffree;
+ fs->fs_maxfilesize = ump->um_savedmaxfilesize;
}
- fs->fs_maxfilesize = ump->um_savedmaxfilesize;
if (bigcgs) {
fs->fs_cgsize = fs->fs_save_cgsize;
fs->fs_save_cgsize = 0;
OpenPOWER on IntegriCloud