From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 13 18:18:01 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37DD416A41F for ; Sun, 13 Nov 2005 18:18:01 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0E7843D46 for ; Sun, 13 Nov 2005 18:18:00 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.3/8.13.3) with ESMTP id jADII0dr037345; Sun, 13 Nov 2005 10:18:00 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.3/8.13.3/Submit) id jADIHx9U037344; Sun, 13 Nov 2005 10:17:59 -0800 (PST) (envelope-from jmg) Date: Sun, 13 Nov 2005 10:17:59 -0800 From: John-Mark Gurney To: Joseph Koshy Message-ID: <20051113181759.GM775@funkthat.com> Mail-Followup-To: Joseph Koshy , freebsd References: <84dead720511112135j435a3723ld15a9d993bbae9cc@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84dead720511112135j435a3723ld15a9d993bbae9cc@mail.gmail.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd Subject: Re: UFS2 max limits? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2005 18:18:01 -0000 Joseph Koshy wrote this message on Sat, Nov 12, 2005 at 11:05 +0530: > The Wikipedia page referenced below says that UFS2 supports a > filesystem size of 2^80 Bytes (1YiB) with the limit on a given > file being 2^55 bytes (32 PiB). Those sound correct, as UFS2 uses 64bit frag addresses, which when combined with a frag size of 16 (for 65536 bytes per frag) gives you 2^80 for total file system size.... as for the file size, The approximate max can be calculated by (blocksize / sizeof(ufs2_daddr_t)) ^ 3 * blocksize the real max would add in addition: (blocksize / sizeof(ufs2_daddr_t)) ^ 2 * blocksize + (blocksize / sizeof(ufs2_daddr_t)) * blocksize + 9 * blocksize so, with a blocksize of 65536, and ufs2_daddr_t's size being 8 bytes, you end up with: (2^16 / 2^3) ^ 3 * 2^16 (2^13)^3 * 2^16 2^(13*3) * 2^16 2^39 * 2^16 2^(39 + 16) 2^55 but if you add the additional blocks, you'll end up with larger, but not enough to go to 2^56 for file sizes... > Are these numbers correct? I somehow remember the limits as > being much lower (of the order of 16TB or so). You might be thinking of UFS1... Now there is a funny thing that I found out about UFS2 and UFS1... UFS1 supports larger file sizes (not file system sizes) due to the fact that the ufs_daddr_t is smaller (32bits), means it can get more out of the indirect blocks than UFS2 can... UFS1 can have files of 2^58 compared to UFS2's 2^55... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."