9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] venti arena
@ 2003-02-28 17:15 Kenji Arisawa
  2003-03-01 17:05 ` Russ Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Kenji Arisawa @ 2003-02-28 17:15 UTC (permalink / raw)
  To: 9fans

Hello,

Why anena.n range  are different among those that are shown by
fmtarenas, fmtindex and checkarenas ?
And why arena.30 exceeds limit of arena size?
How to understand these range ?

Kenji Arisawa

term% venti/fmtarenas arena. /dev/sdD1/arena
clearing the partition
configuring /dev/sdD1/arena with arenas=31 for a total storage of
bytes=16166273024 and directory bytes=65536
adding arena arena.0 at [335872,537206784)
adding arena arena.1 at [537206784,1074077696)
adding arena arena.2 at [1074077696,1610948608)
adding arena arena.3 at [1610948608,2147819520)
adding arena arena.4 at [2147819520,2684690432)
...
adding arena arena.27 at [14495850496,15032721408)
adding arena arena.28 at [15032721408,15569592320)
adding arena arena.29 at [15569592320,16106463232)
adding arena arena.30 at [16106463232,16166608896)


term% venti/fmtindex venti.conf
configure index section in /dev/sdD1/isect
configure arenas in /dev/sdD1/arena
using 65495 buckets of 65495; div=65578
add arena arena.0 at [1048576,537903104)
add arena arena.1 at [537903104,1074757632)
add arena arena.2 at [1074757632,1611612160)
add arena arena.3 at [1611612160,2148466688)
add arena arena.4 at [2148466688,2685321216)
add arena arena.5 at [2685321216,3222175744)
...
add arena arena.28 at [15032975360,15569829888)
add arena arena.29 at [15569829888,16106684416)
add arena arena.30 at [16106684416,16166813696)
configured index=main with arenas=31 and storage=16165765120
term%

term% venti/checkarenas -av /dev/sdD1/arena
arena='arena.0' [344064,537214976)
	version=4 created=1042806254 modified=1045717237
	clumps=74,320 compressed clumps=30,781 data=498,283,412 compressed
data=390,632,400 disk storage=395,314,560



term% ls -lp /dev/sdD1
--rw-r----- S 0 arisawa arisawa 16166614016 Sep 26 07:59 arena
--rw-r----- S 0 arisawa arisawa  1073741824 Sep 26 07:59 fossil
--rw-r----- S 0 arisawa arisawa   536870912 Sep 26 07:59 isect
term%



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] venti arena
  2003-02-28 17:15 [9fans] venti arena Kenji Arisawa
@ 2003-03-01 17:05 ` Russ Cox
  2003-03-02 15:34   ` Kenji Arisawa
  0 siblings, 1 reply; 4+ messages in thread
From: Russ Cox @ 2003-03-01 17:05 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] venti arena
  2003-03-01 17:05 ` Russ Cox
@ 2003-03-02 15:34   ` Kenji Arisawa
  2003-03-02 15:52     ` Russ Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Kenji Arisawa @ 2003-03-02 15:34 UTC (permalink / raw)
  To: 9fans

 >The numbers given by fmtarenas are the real ones.
Thanks Russ.

Let arenas of fmtarenas be:
	[S0, E0])
	[S1, E1)
	..
	[Sn, En)
and let [Sk, Ek) be active.
My understanding is:
	[0, Sk) is frozen
	[Ek, En)  is unwritten
	[En, M) is frozen
where M is size of the disk space for arenas.
OK?

Kenji Arisawa



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] venti arena
  2003-03-02 15:34   ` Kenji Arisawa
@ 2003-03-02 15:52     ` Russ Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Russ Cox @ 2003-03-02 15:52 UTC (permalink / raw)
  To: 9fans

Yes, that is true.  Note that if you want to
read the arena data you should probably
use venti/rdarena rather than do it yourself.

Russ



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-02 15:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-28 17:15 [9fans] venti arena Kenji Arisawa
2003-03-01 17:05 ` Russ Cox
2003-03-02 15:34   ` Kenji Arisawa
2003-03-02 15:52     ` Russ Cox

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