From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] KFS magic size? From: Geoff Collyer MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Date: Sat, 10 Aug 2002 13:54:00 -0700 Topicbox-Message-UUID: da1ed8ce-eaca-11e9-9e20-41e7f4b1d025 To elaborate on anothy's note, here's a summary of the situation that I wrote a few years ago: The maximum size of a single file in a kfs (or plan 9 file server) file system is determined by the file system block size (there are single and double indirect blocks but no triples). The maximum size is approximately (blocksize/512)⁳*8 megabytes or, more accurately, (6+x+x⁲)*d bytes, where d=blocksize-8 and x=d/4: blksize max. file size in MB in bytes 512 7.69 8068032 1024 62.76 65812416 1536 213.20 223564736 2048 507.02 531656640 2560 992.22 1040419776 3072 1716.79 1800185792 3584 2728.73 2861286336 4096 4076.05 4274053056 In addition, at the time of writing (April 1999), the file server and kfs use 32-bit integers internally to hold file sizes and offsets and some of those integers are signed, so the practical limit on the size of a single file is 2⁳ⁱ-1 bytes (roughly 2GB).