Renamed fcksum -> ecksum

This checksum is used to keep track of if we have erased, and not yet
touched, the unused bytes trailing our current commit in the rbyd.

The working theory is that if any prog attempt is made, it will, most
likely, change the checksum of the contents, allowing littlefs to
determine if trailing erased-state is safe to use, even under powerloss.
littlefs can also perturb future data by a single bit, to force this
checksum to always be invalidated during normal operation.

The original name, "forward erased-state checksums (fcksum)", came from the
idea that the checksum "looks forward" into the next commit.

But after using them for a bit, I think the name is unnecessarily
confusing. It, uh, also looks a lot like a swear word. I think
shortening the name to just "erased-state checksums (ecksum)", even
though the previous name is already in use in  a release, is reasonable.

---

It's probably hard to believe but the name change from fcrc -> ecrc
really was unrelated to the crc -> cksum change. But boy is it
convenient for avoiding an awkward name. A lot of these name changes
involved sed scripts, so I didn't notice how awkward fcksum would be to
use until writing this commit message.
This commit is contained in:
Christopher Haster
2023-08-07 13:43:07 -05:00
parent 7031d6e1b3
commit d2f2b53262
8 changed files with 447 additions and 447 deletions
+3 -3
View File
@@ -30,7 +30,7 @@ TAG_UATTR = 0x0400
TAG_SATTR = 0x0500
TAG_ALT = 0x4000
TAG_CKSUM = 0x2000
TAG_FCKSUM = 0x2100
TAG_ECKSUM = 0x2100
@@ -172,8 +172,8 @@ def tagrepr(tag, w, size, off=None):
1 if tag & 0x1 else 0,
' 0x%x' % w if w > 0 else '',
size)
elif tag == TAG_FCKSUM:
return 'fcksum%s %d' % (
elif tag == TAG_ECKSUM:
return 'ecksum%s %d' % (
' 0x%x' % w if w > 0 else '',
size)
elif tag & 0x4000:
+3 -3
View File
@@ -31,7 +31,7 @@ TAG_UATTR = 0x0400
TAG_SATTR = 0x0500
TAG_ALT = 0x4000
TAG_CKSUM = 0x2000
TAG_FCKSUM = 0x2100
TAG_ECKSUM = 0x2100
# parse some rbyd addr encodings
@@ -181,8 +181,8 @@ def tagrepr(tag, w, size, off=None):
1 if tag & 0x1 else 0,
' 0x%x' % w if w > 0 else '',
size)
elif tag == TAG_FCKSUM:
return 'fcksum%s %d' % (
elif tag == TAG_ECKSUM:
return 'ecksum%s %d' % (
' 0x%x' % w if w > 0 else '',
size)
elif tag & 0x4000:
+3 -3
View File
@@ -30,7 +30,7 @@ TAG_UATTR = 0x0400
TAG_SATTR = 0x0500
TAG_ALT = 0x4000
TAG_CKSUM = 0x2000
TAG_FCKSUM = 0x2100
TAG_ECKSUM = 0x2100
# parse some rbyd addr encodings
@@ -180,8 +180,8 @@ def tagrepr(tag, w, size, off=None):
1 if tag & 0x1 else 0,
' 0x%x' % w if w > 0 else '',
size)
elif tag == TAG_FCKSUM:
return 'fcksum%s %d' % (
elif tag == TAG_ECKSUM:
return 'ecksum%s %d' % (
' 0x%x' % w if w > 0 else '',
size)
elif tag & 0x4000:
+3 -3
View File
@@ -39,7 +39,7 @@ TAG_UATTR = 0x0400
TAG_SATTR = 0x0500
TAG_ALT = 0x4000
TAG_CKSUM = 0x2000
TAG_FCKSUM = 0x2100
TAG_ECKSUM = 0x2100
@@ -174,8 +174,8 @@ def tagrepr(tag, w, size, off=None):
1 if tag & 0x1 else 0,
' 0x%x' % w if w > 0 else '',
size)
elif tag == TAG_FCKSUM:
return 'fcksum%s %d' % (
elif tag == TAG_ECKSUM:
return 'ecksum%s %d' % (
' 0x%x' % w if w > 0 else '',
size)
elif tag & 0x4000: