Skip to content

Commit

Permalink
Switched back to simple deorphan-step on directory remove
Browse files Browse the repository at this point in the history
Originally I tried to reuse the indirect delete to accomplish truely
atomic directory removes, however this fell apart when it came to
implementing directory removes as a side-effect of renames.

A single indirect-delete simply can't handle renames with removes as
a side effects. When copying an entry to its destination, we need to
atomically delete both the old entry, and the source of our copy. We
can't delete both with only a single indirect-delete. It is possible to
accomplish this with two indirect-deletes, but this is such an uncommon
case that it's really not worth supporting efficiently due to how
expensive globals are.

I also dropped indirect-deletes for normal directory removes. I may add
it back later, but at the moment it's extra code cost for that's not
traveled very often.

As a result, restructured the indirect delete handling to be a bit more
generic, now with a multipurpose lfs_globals_t struct instead of the
delete specific lfs_entry_t struct.

Also worked on integrating xored-globals, now with several primitive
global operations to manage fetching/updating globals on disk.
  • Loading branch information
geky committed Oct 14, 2018
1 parent 3ffcedb commit cebf7aa
Show file tree
Hide file tree
Showing 3 changed files with 322 additions and 95 deletions.
Loading

0 comments on commit cebf7aa

Please sign in to comment.