From c0323a07fb64ca28dea948838fdbcdfb6567eec8 Mon Sep 17 00:00:00 2001 From: iedowse Date: Wed, 26 Jun 2002 18:34:51 +0000 Subject: 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 --- sbin/fsck_ffs/pass1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sbin/fsck_ffs/pass1.c') 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)) { -- cgit v1.1