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
path: root/lfs.h
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2017-04-15 01:33:36 +0300
committerChristopher Haster <chaster@utexas.edu>2017-04-18 09:44:01 +0300
commitc25c8932198a8714e9b474a41fdd525b2622afc6 (patch)
tree4592291444ffd31a4b40391499c01cab33d80faa /lfs.h
parent96a42581be99dc2b76a42eec274ad5cf769c6af4 (diff)
Moved to brute-force deorphan without parent pointers
Removing the dependency to the parent pointer solves many issues with non-atomic updates of children's parent pointers with respect to any move operations. However, this comes with an embarrassingly terrible runtime as the only other option is to exhaustively check every dir entry to find a child's parent. Fortunately, deorphaning should be a relatively rare operation.
Diffstat (limited to 'lfs.h')
-rw-r--r--lfs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lfs.h b/lfs.h
index eac822f..43de3ee 100644
--- a/lfs.h
+++ b/lfs.h
@@ -153,4 +153,7 @@ lfs_ssize_t lfs_file_write(lfs_t *lfs, lfs_file_t *file,
lfs_ssize_t lfs_file_read(lfs_t *lfs, lfs_file_t *file,
void *buffer, lfs_size_t size);
+int lfs_deorphan(lfs_t *lfs);
+int lfs_traverse(lfs_t *lfs, int (*cb)(void*, lfs_block_t), void *data);
+
#endif