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 17:22:10 PST." <09d601c3c04e$5e09aba0$6739a8c0@hpn5415> From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <925.1071198918.1@t40.swtch.com> Message-Id: Date: Thu, 11 Dec 2003 22:15:18 -0500 Topicbox-Message-UUID: 9ff7eb48-eacc-11e9-9e20-41e7f4b1d025 > Am I write in assuming that both the score and type have to match for a > successful venti block read? 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