A Scalable, User-Friendly Source Control System.
Go to file
Matt Glazar 142415554e Synchronize mount+unmount 1/4: Make unmount cancel mounting
Summary:
I want to make EdenMount robust if mounting and unmounting are requested concurrently. This will make it safer to call EdenMount::destroy in different situations.

Take a step toward that goal by making EdenMount::unmount cancel a concurrent EdenMount::startFuse call.

Changed behaviors:

* If EdenMount::startFuse is in progress, EdenMount::unmount causes the concurrent startFuse call to fail with FuseDeviceUnmountedDuringInitialization.
  * **Old behavior**: startFuse might succeed or might fail with FuseDeviceUnmountedDuringInitialization.
* If EdenMount::startFuse -> PrivHelper::fuseMount is in progress, EdenMount::unmount causes the fuseMount to be rolled back (by calling PrivHelper::fuseUnmount) after fuseMount completes.
  * **Old behavior**: EdenMount::unmount does not change the behavior of EdenMount::startFuse.
  * **Note**: EdenMount::unmount still fails with an exception from PrivHelper, despite having an effect on EdenMount::startFuse. This quirk will be addressed by a future diff.
* If EdenMount::unmount was ever called, EdenMount::startFuse fails with EdenMountCancelled.
  * **Old behavior**: startFuse succeeds.
  * **Note**: EdenMount::unmount still fails with an exception from PrivHelper, despite having an effect on EdenMount::startFuse. This quirk will be addressed by a future diff.

Unchanged behaviors:

* If neither EdenMount::startFuse nor EdenMount::takeoverFuse was never called, EdenMount::unmount fails with an exception from PrivHelper.
* If EdenMount::startFuse -> PrivHelper::fuseMount is in progress, EdenMount::unmount calls PrivHelper::fuseUnmount immediately and either fails or succeeds.
* If EdenMount::startFuse -> PrivHelper::fuseMount is complete, EdenMount::unmount calls PrivHelper::fuseUnmount immediately.
* If EdenMount::takeoverFuse is in progress, EdenMount::unmount does not cause EdenMount::takeoverFuse to fail.
* If EdenMount::takeoverFuse was called, EdenMount::unmount calls PrivHelper::fuseUnmount immediately.
* If EdenMount::unmount was ever called, EdenMount::takeoverFuse succeeds.
* If EdenMount::unmount is called multiple times, one of the calls succeeds, and the remaining calls to unmount fail with an exception from PrivHelper.

Reviewed By: simpkins

Differential Revision: D14398423

fbshipit-source-id: eb86a237859ad2d992de5c901e63dda80d5ea6d5
2019-03-21 13:51:15 -07:00
CMake Add MononokeCurlBackingStore 2019-03-11 14:34:08 -07:00
common spawn thread to publish stats 2019-03-09 10:14:46 -08:00
eden Synchronize mount+unmount 1/4: Make unmount cancel mounting 2019-03-21 13:51:15 -07:00
.gitignore eden: wire up mac contbuild 2019-02-05 21:52:30 -08:00
CMakeLists.txt fix folly logging in cmake 2019-02-22 12:14:54 -08:00
CONTRIBUTING.md Initial commit 2016-05-12 14:09:13 -07:00
getdeps.py eden: getdeps: skip building rsocket tests 2019-02-19 14:53:22 -08:00
LICENSE Initial commit 2016-05-12 14:09:13 -07:00
make-client.py Isolate low-level overlay logic into FsOverlay 2019-03-11 17:30:21 -07:00
PATENTS Initial commit 2016-05-12 14:09:13 -07:00
README.md update README.md 2018-10-30 13:35:40 -07:00

EdenFS is a FUSE virtual filesystem for source control repositories.

EdenFS speeds up operations in large repositories by only populating working directory files on demand, as they are accessed. This makes operations like checkout much faster, in exchange for a small performance hit when first accessing new files. This is quite beneficial in large repositories where developers often only work with a small subset of the repository at a time.

EdenFS has similar performance advantages to using sparse checkouts, but a much better user experience. Unlike with sparse checkouts, EdenFS does not require manually curating the list of files to check out, and users can transparently access any file without needing to update the profile.

EdenFS also keeps track of which files have been modified, allowing very efficient status queries that do not need to scan the working directory. The filesystem monitoring tool Watchman also integrates with EdenFS, allowing it to more efficiently track updates to the filesystem.

Building EdenFS

EdenFS currently only builds on Linux. We have primarily tested building it on Ubuntu 18.04.

TL;DR

[eden]$ ./getdeps.py --system-deps
[eden]$ mkdir _build && cd _build
[eden/_build]$ cmake ..
[eden/_build]$ make

Dependencies

EdenFS depends on several other third-party projects. Some of these are commonly available as part of most Linux distributions, while others need to be downloaded and built from GitHub.

The getdeps.py script can be used to help download and build EdenFS's dependencies.

Operating System Dependencies

Running getdeps.py with --system-deps will make it install third-party dependencies available from your operating system's package management system. Without this argument it assumes you already have correct OS dependencies installed, and it only updates and builds dependencies that must be compiled from source.

GitHub Dependencies

By default getdeps.py will check out third-party dependencies into the eden/external/ directory, then build and install them into eden/external/install/

If repositories for some of the dependencies are already present in eden/external/ getdeps.py does not automatically fetch the latest upstream changes from GitHub. You can explicitly run ./getdeps.py --update if you want it to fetch the latest updates for each dependency and rebuild them from scratch.