Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2017-06-24 08:43:05 +0300
committerChristopher Haster <chaster@utexas.edu>2017-06-28 23:50:47 +0300
commitfe28ea0f93ca550acda24a7490d1e2d1e591daec (patch)
tree5544b207dfddea10bd4b9ca27181fd734dc52efd /lfs_util.h
parent1eeb2a6811b936d3551a26c94aeafa3039535d4d (diff)
Added internal check of data written to disk
Before, the littlefs relied on the underlying block device to report corruption that occurs when writing data to disk. This requirement is easy to miss or implement incorrectly, since the error detection is only required when a block becomes corrupted, which is very unlikely to happen until late in the block device's lifetime. The littlefs can detect corruption itself by reading back written data. This requires a bit of care to reuse the available buffers, and may rely on checksums to avoid additional RAM requirements. This does have a runtime penalty with the extra read operations, but should make the littlefs much more robust to different implementations.
Diffstat (limited to 'lfs_util.h')
-rw-r--r--lfs_util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lfs_util.h b/lfs_util.h
index 7df8170..c996369 100644
--- a/lfs_util.h
+++ b/lfs_util.h
@@ -33,7 +33,7 @@ static inline int lfs_scmp(uint32_t a, uint32_t b) {
return (int)(unsigned)(a - b);
}
-uint32_t lfs_crc(uint32_t crc, const void *buffer, size_t size);
+void lfs_crc(uint32_t *crc, const void *buffer, size_t size);
// Logging functions