From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] venti block score & type In-Reply-To: Your message of "Thu, 11 Dec 2003 20:05:10 PST." <0a2d01c3c065$233128c0$6739a8c0@hpn5415> From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2599.1071203149.1@t40.swtch.com> Message-Id: Date: Thu, 11 Dec 2003 23:25:49 -0500 Topicbox-Message-UUID: a02de3d8-eacc-11e9-9e20-41e7f4b1d025 > > > 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. > > 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? 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