diff options
author | Christopher Haster <chaster@utexas.edu> | 2017-04-15 01:33:36 +0300 |
---|---|---|
committer | Christopher Haster <chaster@utexas.edu> | 2017-04-18 09:44:01 +0300 |
commit | c25c8932198a8714e9b474a41fdd525b2622afc6 (patch) | |
tree | 4592291444ffd31a4b40391499c01cab33d80faa /lfs.h | |
parent | 96a42581be99dc2b76a42eec274ad5cf769c6af4 (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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |