From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <58ad5d4425f25610bb47189abe11a438@collyer.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] kfs file size limit? From: Geoff Collyer In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Date: Tue, 22 Apr 2003 21:44:48 -0700 Topicbox-Message-UUID: 96544f88-eacb-11e9-9e20-41e7f4b1d025 The short answer: yes, if you are using a block size of 1024 bytes. The fix: don't do that, use a bigger block size. The long answer, which I may have sent to the list before: --- 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 4608 5806.74 6088817600 5120 7968.81 8355911616 5632 10610.26 11125666752 6144 13779.08 14448414656 6656 17523.27 18374486976 7168 21890.84 22954215360 7680 26929.78 28237931456 8192 32688.10 34275966912 8704 39213.80 41118653376 9216 46554.87 48816322496 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). ---