Skip to content

Commit 64df0a5

Browse files
committed
Added orphan bit to xored-globals
Unfortunately for us, even with the new ability to store global state, orphans can not be handled as gracefully as moves. This is due to the fact that directory operations can create an unbounded number of orphans. It's usually small, the fact that it's unbounded means we can't store the orphan info in xored-globals. However, one thing we can do to leverage the xored-global state is store a bit indicating if _any_ orphans are present. This means in the common case we can completely avoid the deorphan step, while only using a single bit of the global state, which is effectively free since we can store it in the globals tag itself. If a littlefs drive does not want to consider the orphan bit, it's free to use the previous behaviour of always checking for orphans on first write.
1 parent 1a58ba7 commit 64df0a5

File tree

2 files changed

+220
-172
lines changed

2 files changed

+220
-172
lines changed

0 commit comments

Comments
 (0)