Refactored deduplicate/deorphan step to single deorphan step

Deduplication and deorphan steps aren't required under indentical
conditions, but they can be processed in the same iteration of the
filesystem. Since lfs_alloc (requires deorphan) occurs on most write
calls to the filesystem (requires deduplication), it was simpler to
just compine the steps into a single lfs_deorphan step.

Also traded out the places where lfs_rename/lfs_remove just defer
operations to the deorphan step. This adds a bit of code, but also
significantly speeds up directory operations.
This commit is contained in:
Christopher Haster
2017-10-07 16:56:00 -05:00
parent 2936514b5e
commit 539409e2fb
2 changed files with 113 additions and 121 deletions

1
lfs.h
View File

@@ -244,7 +244,6 @@ typedef struct lfs {
lfs_free_t free;
bool deorphaned;
bool deduplicated;
} lfs_t;