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
This commit is contained in:
parent
96a3131530
commit
46be1c6905
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user