Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jun 1997 10:37:00 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        sef@Kithrup.COM (Sean Eric Fagan)
Cc:        fs@FreeBSD.ORG
Subject:   Re: file size limits question
Message-ID:  <199706111737.KAA06274@phaeton.artisoft.com>
In-Reply-To: <199706110557.WAA05138@kithrup.com> from "Sean Eric Fagan" at Jun 10, 97 10:57:14 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> On my 2.2-970212-GAMMA (hey that's not a Y2k compliant name!) system, /tmp
> is an MFS filesystem; $HOME is a normal, SCSI-disk UFS filesystem.
> 
> When I run this program and create a file in /tmp, it creates a file that is
> 34376613888 bytes long.  When it creates a file in $HOME, it is 2147483647
> bytes long.
> 
> I am surprised by this difference.  Can anyone explain it, or do I have to
> dive into the device driver code?  (I am assuming that the limitation is
> going to be in the device driver, not the filesystem, given that MFS is
> essentially UFS...)


I'm not surprised.  But then, I've complained about similar limits
in the past in regard to device/offset vs. vnode/offset mapping.


CRYPTIC ANSWER

	34376613888 bytes = 67141824 blocks = pow( 2, 26)
	2147483647 bytes =  4194304 blocks = pow( 2, 22)

	pow( 2, 26 - 22) = 16
	16 * blocksize = 16 * 512 = 8k

	Hmmm... you seem to be running with an 8k block size on your UFS.

CLEAR(ER) ANSWER

	UFS block counts are in terms of file system blocks

	MFS block counts are in terms of device driver blocks

	FreeBSD is limited because of the way it deals with
	address space mappings for VM objects.


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706111737.KAA06274>