Skip to content

Add OverlayFS implementation to replace 3rd party one

Paul Slaughter requested to merge ps-fix-overlay-fs into main
  • There's a number of bugs with the original 3rd party implementation.
  • We need to keep track of deleted directories to avoid issues like this one.
  • We separate OverlayFS from OverlayFSImpl. The impl uses promises and is easier to maintain. It implements the business logic without actually adhering to the expected interface.

Screenshots

Before (on main) After (this MR)
20221126_before 20221126_after

How to review

  1. The main files being added are OverlayFS.ts and OverlayFSImpl.ts. These are inspired off of the original BrowserFS implementation, but fix some fundamental issues.
  2. OverlayFS.ts maps the underlying business logic (implemented in OverlayFSImpl.ts) to the interfaces and subclasses that BrowserFS expects. This module does not contain business logic itself. It's main responsibility is mapping the implementation to the BrowserFS interfaces (so that the implementation doesn't have to use BrowserFS's cumbersome interface).
  3. OverlayFSImpl.ts implements the actual OverlayFS strategy. Checkout the class description for details. Each method also contains a link to the original implementation. In some cases the method might deviate a bit (particularly when we need to touch or read from the .deletedFiles.log), which is intentional to fix issues with the original implementation.
  4. Consider reviewing the tests first.

Screen_Shot_2022-11-26_at_3.21.02_PM

Edited by Paul Slaughter

Merge request reports