summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs/pass1.c
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 /sbin/fsck_ffs/pass1.c
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 'sbin/fsck_ffs/pass1.c')
-rw-r--r--sbin/fsck_ffs/pass1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c
index 6562155..4a7fd54 100644
--- a/sbin/fsck_ffs/pass1.c
+++ b/sbin/fsck_ffs/pass1.c
@@ -221,7 +221,10 @@ checkinode(ino_t inumber, struct inodesc *idesc)
}
lastino = inumber;
/* This should match the file size limit in ffs_mountfs(). */
- kernmaxfilesize = (off_t)0x40000000 * sblock.fs_bsize - 1;
+ if (sblock.fs_magic == FS_UFS1_MAGIC)
+ kernmaxfilesize = (off_t)0x40000000 * sblock.fs_bsize - 1;
+ else
+ kernmaxfilesize = sblock.fs_maxfilesize;
if (DIP(dp, di_size) > kernmaxfilesize ||
DIP(dp, di_size) > sblock.fs_maxfilesize ||
(mode == IFDIR && DIP(dp, di_size) > MAXDIRSIZE)) {
OpenPOWER on IntegriCloud