Re: About LeanFS
Posted: Fri Dec 09, 2022 5:59 am
And there was much rejoicingBenLunt wrote:After much consideration and thought, I have taken your advise and removed the option of multiple text encodings. UTF-8 is now specified for all text strings.
The spec doesn't indicate how the block bitmap checksum is calculated.May I quote something I saw over on hackaday.org today:"but it better be better...to falling so in love with your idea, that you lose sight of what it really means to be better."
Thank you all for your comments. The new specs are up, with an addition. This addition makes all aspects of the volume have a checksum (when extended checksums are used). The Superblock, Inodes, Indirects, Extents, and now the bitmap.
It can't use the existing checksum definition, because:
[*] The existing checksum reserves the first uint32_t for the checksum itself, and so doesn't include it in the checksum.
[*] The existing checksum is for a contiguous data structure, and the bitmap is not contiguous.
With that in mind, perhaps it's worth redefining the checksum procedure, so that:
[*] All the passed in data is included in the checksum, not skipping the first field (this skipping would have to be done by the caller if required.)
[*] Pass in a partial checksum, that will be used instead of 0 at the start.
With the above, we can run the checksum against each bitmap in turn, keeping track of the partial checksum on the way, and putting the final checksum in the superblock.
You'd also need this for the data checksum for the per-extent checksums.