Lluís Batlle wrote:
2006/2/6, Russ Cox <[EMAIL PROTECTED]>:
Anyway I've don't
understood what does Venti do when a hash is found in the stored
blocks, and the contents of the blocks are different (the
low-probability case). I imagine there is some code which does not
give a data-loss... Can someone give a small explanation about that?
It responds to the write RPC with an error.
So what should manage that error? The application? Maybe it try a
different write size?
In fact there should be another application layer between 9p and the
RPC for venti, isn't it? (which?)
Lluis, in a system like this, if two blocks have the same hash, they are
by definition the same. It therefore makes no sense to say 'what if the
data is different'. The data is not, from the viewpoint of venti. So a
write of a block with hash X, when a block of hash X already exists in
venti, is an error. It's the same data. So you get an error on the write
RPC.
So your real question is, 'what if a block B' has the same hash as a
block B? What does venti do?" It returns B, not B', as it should. That's
the underlying rule. That's one reason you want a long hash, with a good
design :-)
Now, let's see if I got this right :-)
ron