Similarly, that attempting to write a block whose score is already in venti,
but with a different type, will fail?
If so, the score is a unique key for a block but the type must always match
for all subsequent references to that block.
John
Yes.
> Similarly, that attempting to write a block whose score is already in venti,
> but with a different type, will fail?
No. A new index entry will be written for the new type.
Types are really just to help a little in interpreting the
data. They're almost purely advisory. (Almost, because
the answer to your first question is yes.) Since blocks are
zero-truncated before storing, the zero-length block
might reasonably be interpreted as a data block or as
a pointer block of any depth. Similarly, if I store a file
whose contents are the SHA1 hash of a small file, that
contents will be stored as data, but storing the small file
itself would use the same block as a first-level pointer
block.
Russ
So venti stores a list of types written for each score? Thus reading a
block would require that the type be in that list, but writing a block would
add the type to the list if it was not already present?
John
Sure, that would be one way.
In the current Venti server, writing a block with
a new type adds a whole new (score, type) index
entry. The index entries only have one type,
not a list.
Russ