9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Geoff Collyer <geoff@collyer.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] KFS magic size?
Date: Sat, 10 Aug 2002 13:54:00 -0700	[thread overview]
Message-ID: <a6c36e1a01b5054090c67d99ab00c6bc@collyer.net> (raw)

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).



             reply	other threads:[~2002-08-10 20:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-10 20:54 Geoff Collyer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-08-10 15:31 anothy
2002-08-10 10:44 Lucio De Re

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a6c36e1a01b5054090c67d99ab00c6bc@collyer.net \
    --to=geoff@collyer.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).