9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] venti arena
Date: Sat,  1 Mar 2003 12:05:04 -0500	[thread overview]
Message-ID: <d44567936f5cef0662766201454069c2@plan9.bell-labs.com> (raw)
In-Reply-To: <434D1620-4B40-11D7-BF2B-000393A941BC@ar.aichi-u.ac.jp>

I've never understood all the inconsistencies you
just pointed out, so I dug around for a little while.

The numbers given by fmtarenas are the real ones.

The index uses ``virtual'' addresses which get mapped
into (arena-name, offset) pairs.  The base for the virtual
addresses is 1M.  If you had multiple arena partitions 
you'd see that the index entries for the arenas in that
disk start where the previous disk left off.  These virtual
addresses are the numbers that fmtindex prints.

I think checkarenas is just buggy.  There are head and tail
blocks around each arena's data section, and checkarenas
is printing

	[datastart, datastart+datasize+2*blocksize)

instead of

	[datastart-blocksize, datastart+datasize+blocksize)

That is, checkarenas thinks datastart has the blocksize subtracted
from it already, but that's not the case.  The http://server/index
listing uses the same code, and is thus similarly off.
This is why the backup script I posted subtracts one block size
before using the offset in the listing.  (Though that was just
trial and error on my part at the time.)

Russ



  reply	other threads:[~2003-03-01 17:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-28 17:15 Kenji Arisawa
2003-03-01 17:05 ` Russ Cox [this message]
2003-03-02 15:34   ` Kenji Arisawa
2003-03-02 15:52     ` Russ Cox

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=d44567936f5cef0662766201454069c2@plan9.bell-labs.com \
    --to=rsc@plan9.bell-labs.com \
    --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).