diff options
author | njl <njl@FreeBSD.org> | 2005-10-21 01:54:00 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-10-21 01:54:00 +0000 |
commit | 46be1c690597848938f248149c994c7c1ecaab17 (patch) | |
tree | 9e003190d25fdd3e3f4383110655d16968a8a20b /sys/ufs/ffs | |
parent | 96a31315307517f15ef5537afa8b7a5d17958fa7 (diff) | |
download | FreeBSD-src-46be1c690597848938f248149c994c7c1ecaab17.zip FreeBSD-src-46be1c690597848938f248149c994c7c1ecaab17.tar.gz |
Adjust maxfilesize for UFS1 and old 4.4 FFS. For UFS1, increase the limit
to (max block - 1) * bsize. For DEV_BSIZE, this doubles the limit from
0.5 TB to 1 TB. For the old 4.4 FFS case, decrease the limit from 0.5 TB
to 2 GB - 1. Older systems had a 32 bit off_t so they couldn't access the
larger files anyway.
Collaboration with: bde
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index c40d5bb..da4a362 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -845,13 +845,13 @@ ffs_oldfscompat_read(fs, ump, sblockloc) } if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_old_inodefmt < FS_44INODEFMT) { - fs->fs_maxfilesize = (u_quad_t) 1LL << 39; + fs->fs_maxfilesize = ((uint64_t)1 << 31) - 1; fs->fs_qbmask = ~fs->fs_bmask; fs->fs_qfmask = ~fs->fs_fmask; } if (fs->fs_magic == FS_UFS1_MAGIC) { ump->um_savedmaxfilesize = fs->fs_maxfilesize; - maxfilesize = (u_int64_t)0x40000000 * fs->fs_bsize - 1; + maxfilesize = (uint64_t)0x80000000 * fs->fs_bsize - 1; if (fs->fs_maxfilesize > maxfilesize) fs->fs_maxfilesize = maxfilesize; } |