Commit Graph

188 Commits

Author SHA1 Message Date
Adam Simpkins
0824d0280c update all C++ unit tests to use the new temporary file functions
Summary:
Update all of the C++ unit tests that create temporary files and directories
to use the new `facebook::eden::makeTempFile()` and
`facebook::eden::makeTempDir()` functions.

Note that this likely changes the behavior of some code paths in meaningful
ways: `/dev/shm` normally does not support `getxattr()`, and Eden's overlay
code attempts to store the SHA-1 for materialized files as using extended
attributes.  This means that the tests will now typically hit the fallback
code path and will not store SHA-1 data in the overlay.

Reviewed By: chadaustin, strager

Differential Revision: D12971162

fbshipit-source-id: 6cc5eba2e04be7e9a13a30e90883feadfb78f9ce
2018-11-09 14:29:17 -08:00
Wez Furlong
3bee7ea2cc fixup root cause of ESTALE
Summary:
Thanks to some bpf tracing by strager, we traced the ESTALE response to
`d_splice_alias` and noted this comment above the implementation in the kernel:

> If a non-IS_ROOT directory is found, the filesystem is corrupt, and
> we should error out: directories can't have multiple aliases.

Well, our magic `.eden` directory is a directory with aliases and we were
seeing the error trigger on that dir.  So, this diff replaces hardlinking
directories into each tree with a hardlink to a symlink in each tree!

At mount time we create `.eden/this-dir` as a symlink to `/abs/path/to/mount/.eden`
so that `readlink("/abs/path/to/mount/sub/dir/.eden/socket")` still
resolves as it did prior to this diff.

Reviewed By: strager

Differential Revision: D12954819

fbshipit-source-id: 7f3b1b53f2bd5b9c51e64055fc34110657a19110
2018-11-07 15:20:58 -08:00
Dan Schatzberg
8fe62ce81b Add command to chown a mount
Summary:
Sandcastle has several cases where we chown the entire
repository which performs terribly on Eden. As a workaround we have a
command to do this in eden without loading all the files.

Reviewed By: chadaustin

Differential Revision: D12857956

fbshipit-source-id: 36cebcc710fbcf4e1eb265df901513cf50a227b9
2018-11-07 08:58:31 -08:00
Chad Austin
e6155c46a7 split CheckoutTest.modifyFile into three
Summary:
Checkout.modifyFile is the long pole when running the Eden unit
tests. Splitting it into three runs it across multiple threads. It
could be split further if needed.

Reviewed By: strager

Differential Revision: D12813684

fbshipit-source-id: 49e847d46bc54f16fcb2b273ec81e92eaf756dbb
2018-10-26 22:04:21 -07:00
Chad Austin
2a6dd2879d folly::Optional -> std::optional
Summary: Eden's on C++17 so fully cross the rubicon!

Reviewed By: strager

Differential Revision: D10498200

fbshipit-source-id: 4e2af5a8d5cef9a106e8c05e6f93ea9e5b8e696e
2018-10-23 18:51:59 -07:00
Chad Austin
1b15f8a7de ensure bind mounts exist via the inode tree rather than FUSE
Summary:
Using boost::filesystem to create the bind mount directories causes
edenfs to communicate with itself via FUSE, which causes edenfs to die
at startup (sometimes?). Instead, create the directories by traversing
the TreeInodes.

Reviewed By: simpkins

Differential Revision: D10154921

fbshipit-source-id: 4d8be71911e8a988b6fc5796904856f58a9a5153
2018-10-09 16:39:45 -07:00
Chad Austin
ba969afce8 replace getBlobMetadata with a more specific getSha1
Summary:
Instead of calling getBlobMetadata in multiple places and only using
the .sha1 field, add a getSha1 function directly to ObjectStore. This
gives ObjectStore the latitude to fetch it and store it in different ways.

Reviewed By: wez

Differential Revision: D10227935

fbshipit-source-id: 180830534db3c42c07f04216599e496406af5ced
2018-10-08 15:11:55 -07:00
Chad Austin
cb4674d514 move write from EdenFileHandle to FileInode
Summary: Always send write requests straight to the inode rather than going through FileHandle.

Reviewed By: wez

Differential Revision: D10220619

fbshipit-source-id: 9ce328583cf0fa9d7d8850d92d9e15ddc382d6a3
2018-10-08 15:11:55 -07:00
Chad Austin
462522898d move read from EdenFileHandle to FileInode
Summary:
Always send read requests straight to the inode rather than going
through the FileHandle.

Reviewed By: wez

Differential Revision: D10220604

fbshipit-source-id: 6aa5d20f3ce09696a29bd5c1cb95d0b987ab213c
2018-10-08 15:11:55 -07:00
Chad Austin
88b08e5b00 clang-format
Summary: We've diverged in a few places from clang-format, so run it across the entirety of Eden.

Reviewed By: wez

Differential Revision: D10137785

fbshipit-source-id: 9603c2eeddc7472c33041ae60e3e280065095eb7
2018-10-02 10:07:38 -07:00
Chad Austin
62a2682487 test that inodes can be unloaded while they're loading
Summary:
My eden crashed with an invariant violation in InodeMap. It looks
related to background unloading, so I attempted to reproduce the
sequence in a unit test.

These tests pass but they're worth checking in I think.

Reviewed By: strager

Differential Revision: D9998970

fbshipit-source-id: d182fc8d5b185c286082320adda3ea4c862f2f18
2018-09-25 17:36:46 -07:00
Matt Glazar
edbb3838ba Fix crash during inode scan
Summary:
If the overlay file for a directory is corrupted (e.g. empty), Overlay::scanForNextInodeNumber throws. This causes Eden to crash on start [1]. Fix the crash by ignoring corrupted directories.

[1] `test_mount_possible_after_corrupt_directory_and_cached_next_inode_number` reproduces this crash.

Reviewed By: chadaustin

Differential Revision: D9806105

fbshipit-source-id: 1b95083b6a6aa253a2296d6f754edbf4b9f64734
2018-09-17 14:23:53 -07:00
Lee Howes
e8e25257cf Future<T>::then Future<T>::then() -> Future<T>::thenValue or thenTry.
Summary:
Part of the larger project to modify Future<T>::then to be r-value qualified and use Future<T>::thenTry or Future<T>::thenValue.

The goal is to disambiguate folly::Future and to improve type and lifetime safety of Future and its methods.

Codemod:
  future<T>.then(callable with operator()(not-a-try)) to future<T>.thenValue(callable with operator()(not-a-try)).
  future<T>.then(callable with operator()()) to future<T>.thenValue(callable with operator()(auto&&)).
  future<T>.then(callable with operator()(auto)) to future<T>.thenValue(callable with operator()(auto)).
  future<T>.then(callable with operator()(folly::Try<T>)) to future<T>.thenTry(callable)

Reviewed By: Orvid

Differential Revision: D9819578

fbshipit-source-id: f9e31f47354c041ecbf0a90953cbe50ebfda6adc
2018-09-14 17:10:57 -07:00
Matt Glazar
b3a7d80c03 Print inode tree on overlay test failure
Summary: When a RawOverlayTest test fails, it's sometimes difficult to diagnose the failure because assertions use inode numbers instead of file paths. When a test fails, include inode data (with file paths) in the failure message.

Reviewed By: chadaustin

Differential Revision: D9806106

fbshipit-source-id: 6160632bf8c64ceeb84e9d4709347e9268747ca4
2018-09-13 14:55:03 -07:00
Matt Glazar
57ec146629 Refactor setup code in RawOverlayTest
Summary:
Reduce some code duplication in RawOverlayTest:

* Factor testDir_-to-AbsolutePath conversion into a getLocalDir function.
* Factor Overlay construction into a loadOverlay function.
* Use getLocalDir to construct the path to next-inode-number.

This refactor will let me use getLocalDir for more things in future diffs.

This diff should not change behavior.

Reviewed By: chadaustin

Differential Revision: D9813443

fbshipit-source-id: ab0dc88d36e91fc04e0aeb48468060b93b48f0ec
2018-09-13 14:24:14 -07:00
Chad Austin
5567363018 add a function that only unloads children unreferenced by FUSE
Summary: Add yet another unloading code path... This one is used for fast checkouts.

Reviewed By: strager

Differential Revision: D9781956

fbshipit-source-id: ae89377aea823f94e2ec1bcc2fa209c8f9bc821c
2018-09-12 14:37:25 -07:00
Chad Austin
5070d76451 fix TreeInode::unloadChildrenNow so it unloads trees
Summary:
unloadChildrenNow would only unload files or trees at the leaf. Apply
the fixes from D8302998 to unloadChildrenNow, which is only called
during takeover.

Reviewed By: strager

Differential Revision: D9774970

fbshipit-source-id: c2f4d1e6b838cc3b9e99eb8786114e643128a519
2018-09-12 14:37:24 -07:00
Chad Austin
262aff7bda Have eden debug unload unload trees too
Summary:
Rewrite the unload code to avoid UB (comparing freed InodeBase
pointers) and unload tree inodes too.

Reviewed By: simpkins

Differential Revision: D8302998

fbshipit-source-id: c3c3b1a65209735056fbc66216e4f01eafd65492
2018-08-31 11:22:30 -07:00
Lee Howes
6e7b264295 Future<T>::then Future<T>::then(not-try-task) -> Future<T>::thenValue(task).
Summary:
Overall plan to modify Future<T>::then to be r-value qualified and use Future<T>::thenTry or Future<T>::thenValue.

The goal is to disambiguate folly::Future and to improve type and lifetime safety of Future and its methods.

Codemod:
 * future<T>.then(callable with operator()(not-a-try)) to future<T>.thenValue(callable with operator()(not-a-try)).
 * future<T>.then(callable with operator()()) to future<T>.thenValue(callable with operator()(auto&&)).
 * future<T>.then(callable with operator()(auto)) to future<T>.thenValue(callable with operator()(auto)).

Reviewed By: chadaustin

Differential Revision: D9443286

fbshipit-source-id: be712b58b92dc7422f128713deaf6f46b29b36ce
2018-08-22 12:07:41 -07:00
Chad Austin
bfc189cc92 Use a deterministic executor in TestMount
Summary:
As a prerequisite to running inode unloading code in a background
queue, use a deterministic executor in TestMount to make sequencing in
unit tests reliable.

Reviewed By: simpkins

Differential Revision: D9323878

fbshipit-source-id: 0b85632c1637a8cf83d6f238675e5b6bbb6923c7
2018-08-21 12:23:00 -07:00
Chad Austin
6394450579 restructure JournalDelta and fix Watchman subscription race
Summary:
Watchman's Eden integration has a bug where the combination of
Watchman querying Eden for overlapping delta ranges ("give me changes
between X and Y, now changes between X+1 and Y+1") and Eden eliding
redundant change events ("add-modify-remove" -> []) results in
Watchman sometimes reporting that a file exists in its final
subscription update when it no longer does.

The fix is to never elide events, even for files that were added and
removed in the same sequence. To continue to support Watchman's `new`
flag, track whether a file existed at the beginning and end of a
journal delta.

Reviewed By: wez

Differential Revision: D9304964

fbshipit-source-id: f34c12b25f2b24e3a0d46fc94aa428528f4c5098
2018-08-15 14:52:06 -07:00
Lee Howes
69d8203162 Future<T>::then 6/n: Future<T>::then() & -> Future<T>::then() &&.
Summary:
Overall plan to modify Future<T>::then to be r-value qualified and use Future<T>::thenTry or Future<T>::thenValue.

The goal is to disambiguate folly::Future and to improve type and lifetime safety of Future and its methods.

6/n: Codemod rvalue-future<T>.then(...) to rvalue-future<T>.then(...).

Reviewed By: yfeldblum

Differential Revision: D9152002

fbshipit-source-id: 166475c1dcafb29a11154cbfbdf7e2e1feaf745b
2018-08-03 23:36:16 -07:00
Chad Austin
5d54a799c9 Rename UnboundedQueueThreadPool to UnboundedQueueExecutor and add a ManualExecutor variant
Summary:
To improve the determinism of our C++ tests, I am planning to switch
TestMount to a ManualExecutor. This adds a ManualExecutor constructor
to UnboundedQueueExecutor.

In Rust, I'd use a trait, but a simple class with two constructors works fine.

Reviewed By: strager

Differential Revision: D8846553

fbshipit-source-id: c52752105255503d26f1e65494c32b3f62882e44
2018-08-03 13:21:59 -07:00
Matt Glazar
ae291d0a5d Refactor Overlay::InodePath
Summary:
InodePath is difficult to work with because it's just an alias to std::array. Make InodePath look more like std::string so using InodePath instances is more intuitive.

This diff should not change behaviour.

Reviewed By: chadaustin

Differential Revision: D8923073

fbshipit-source-id: 85a2548f0cfa61e50b6590048084076b9bece3da
2018-07-20 11:50:51 -07:00
Eamonn Kent
2f39c5297e DiffContext changes to use TopLevelIgnores
Summary:
Make use of the TopLevelIgnores class to hold the system and user
GitIgnoreStack details. This is a cleaner implementation making ownership
semantics more intuitive. In later commits we will provide acess to the
TopLevelIgnores as part of the ServerState. It will be dynamically loaded.

Reviewed By: simpkins

Differential Revision: D8906226

fbshipit-source-id: d955436582498861ac4b4113a47f357432c8f32e
2018-07-19 17:21:38 -07:00
Wez Furlong
5b36617f84 add InodeLoader to improve getFileInformation perf
Summary:
Some of the heavier watchman->eden queries in www today
trigger calls to `getFileInformation` with very large numbers
of paths.

For a set of paths with a lot of common prefixes there is a lot
of repeated work to load same inodes over and over again.

eg: `a/b/c/d/A` and `a/b/c/d/B` both have to load `a -> b -> c -> d` before
they can load the leaf node.

This diff pre-processes the list of paths and builds a tree-shaped plan
so that we won't need to load any inode referenced by any of the paths
more than once.

The `getSHA1` method could benefit from a similar change; I'll do that in
a follow-up diff.

Reviewed By: strager

Differential Revision: D8578261

fbshipit-source-id: e899640a2ef6dcdb6b903d2a2735e9240496d74b
2018-07-12 11:53:54 -07:00
Marshall Cline
af39582cc8 use rvalue-qual Future::get(...)
Summary:
This is part of "the great r-valuification of folly::Future":

* This is something we should do for safety in general.
* Context: `Future::get(...)` means both `Future::get()` and `Future::get(Duration)`
* Using lvalue-qualified `Future::get(...)` has caused some failures around D7840699 since lvalue-qualification hides that operation's move-out semantics - leads to some use of future operations that are really not correct, but are not obviously incorrect.
* Problems with `Future::get(...) &`: it moves-out the result but doesn't invalidate the Future - the Future remains (technically) valid even though it actually is partially moved-out. Callers can subsequently access that moved-out result via things like `future.get(...)`, `future.result()`, `future.value()`, etc. - these access an already-moved-out result which is/can be surprising.
* Reasons `Future::get(...) &&` is better: its semantics are more obvious and user-testable. It moves-out the Future, leaving it with `future.valid() == false`.

Reviewed By: LeeHowes

Differential Revision: D8756764

fbshipit-source-id: 5c75c79cebcec77658a3a4605087716e969a376d
2018-07-09 08:51:43 -07:00
Marshall Cline
d71a100be2 use rvalue-qual Future::get(): pass 5
Summary:
This is part of "the great r-valuification of folly::Future":

* This is something we should do for safety in general.
* Context: `Future::get(...)` means both `Future::get()` and `Future::get(Duration)`
* Using lvalue-qualified `Future::get(...)` has caused some failures around D7840699 since lvalue-qualification hides that operation's move-out semantics - leads to some use of future operations that are really not correct, but are not obviously incorrect.
* Problems with `Future::get(...) &`: it moves-out the result but doesn't invalidate the Future - the Future remains (technically) valid even though it actually is partially moved-out. Callers can subsequently access that moved-out result via things like `future.get(...)`, `future.result()`, `future.value()`, etc. - these access an already-moved-out result which is/can be surprising.
* Reasons `Future::get(...) &&` is better: its semantics are more obvious and user-testable. It moves-out the Future, leaving it with `future.valid() == false`.

Reviewed By: yfeldblum

Differential Revision: D8711368

fbshipit-source-id: fbfcb731097cdf9d8d98583956bc7fe614157a6b
2018-07-02 07:05:52 -07:00
Adam Simpkins
7beb20cb36 put the overlay test data into a tar file
Summary:
The OverlayGoldMasterTest.can_load_overlay_v2 unit test is failing stress test
runs because it keeps overlay data checked into the source repository and runs
the tests directly against this directory.  This causes the tests to fail if
multiple test are run in parallel since they are all trying to use this same
directory simultaneously.

We need to make a copy of this directory rather than having the tests run
directly against the source tree to avoid locking issues.  The overlay code
can potentially also try to upgrade the overlay format when it opens the
directory.  This seems like another reason why it should not run directly
against the directory in the source repository.

This changes the test to make a copy of the overlay directory in a temporary
location, and run the tests against that directory.  As part of this change I
also bundled the original input into a tar file.

Reviewed By: chadaustin

Differential Revision: D8555716

fbshipit-source-id: bf24bd96a0a31c097d9cf8e0fbe8b0bfaf009943
2018-06-20 18:36:27 -07:00
Marshall Cline
9825a9fd3f modernize Future::get(): 4/n = codemod to std::move for non-ptr exprs
Summary:
Codemod non-pointer expressions:
   - expr.get() ==> std::move(expr).get()
   - expr.get(dur) ==> std::move(expr).get(dur)
when expr is not already an xvalue.

Reviewed By: yfeldblum

Differential Revision: D8429621

fbshipit-source-id: 87dea0749509d7083f14be93505ffff14ae8d464
2018-06-19 23:21:11 -07:00
Chad Austin
193e26d73f Fix Eden build
Summary:
There was a conflict between the DirContents refactoring and some of
the Overlay diffs.

(Note: this ignores all push blocking failures!)

Reviewed By: strager

Differential Revision: D8427680

fbshipit-source-id: a01a2a8456f7a35249d8b65f2b5fcd55825438ee
2018-06-14 12:12:57 -07:00
Chad Austin
dee08204fd refactor Overlay path generation
Summary:
As code review follow-up from D8321501 and D8330070, have getFilePath
return InodePath rather than the index to the null terminator.

Also move getFileTmpPath and ensureTmpDirectoryCreated into their own
functions

Reviewed By: strager

Differential Revision: D8363811

fbshipit-source-id: 42718ed4af07fc7a6600564cc7d934f85fe333ed
2018-06-14 10:22:55 -07:00
Chad Austin
7953c2280d add gold master test for current overlay format
Summary:
To avoid regressing loading existing Overlay formats, add a gold
master test.

Reviewed By: wez

Differential Revision: D8329998

fbshipit-source-id: b969e38607dcc0cac6bb32da74aacd8bb036b0b3
2018-06-13 21:07:48 -07:00
Chad Austin
3df12e3af3 add a simple manual benchmark for Overlay::saveOverlayDir
Summary:
To get a read on whether there's anything egregious about the
overlay on various filesystem types and whether we can make any quick
improvements, I wrote up this quick benchmark.

Reviewed By: strager

Differential Revision: D8310783

fbshipit-source-id: 15fa1ea4bcbb7e4896e52b4acf0f8802133dbf3c
2018-06-13 21:07:38 -07:00
Chad Austin
8e556e4979 Don't derive TreeInodeState from DirContents
Summary:
Per a conversation with simpkins when code reviewing D7882648, this
diff removes the inheritance relationship between TreeInodeState and
DirContents. It doesn't change the binary layout of anything, but
defines DirContents as a typedef of PathMap<DirEntry>.

Reviewed By: strager

Differential Revision: D8232052

fbshipit-source-id: a2166f3ca2ab90fabbded0e48307b8a92a2b0250
2018-06-13 11:53:33 -07:00
Adam Simpkins
000379d099 fix FileInode::isSameAs() to correctly wait on Future completion
Summary:
The two FileInode::isSameAs() methods called FileInode::getSha1(), which
returns a folly::Future object, and immediately called `value()` on the
resulting future without waiting for it to complete first.

This bug dates back to D5430128.  However, I suspect it was D7888344 that
actually exposed this issue recently.  D7888344 updates the
`RocksDbLocalStore` code to perform work in an I/O thread pool.  Before this
change the SHA1 futures were likely always immediately ready, so this bug was
not causing problems.

Reviewed By: wez

Differential Revision: D8393671

fbshipit-source-id: ec2116751ddda31a119bfe85eab5612b622f83cf
2018-06-13 01:20:39 -07:00
Sergey Zhupanov
d5f2b60e1d Fixed Eden warnings-turned-errors revealed by @mode/opt build.
Summary: Disabled annoying and useless missing braces warnings and fixed a couple assigned-but-not-used warnings.

Reviewed By: aary

Differential Revision: D8242771

fbshipit-source-id: 09e55f028f3aaac25fe78d4d1f0edf663fc020b1
2018-06-01 16:32:21 -07:00
Chad Austin
feb2da11d6 update mtime on directories when renaming
Summary:
This fixes a bug simpkins pointed out in D6891479 - we weren't
updating mtime and ctime on renames.

Reviewed By: simpkins

Differential Revision: D7937303

fbshipit-source-id: 08fd8f4fe5d99d33e9f7629965d6146330c8f35b
2018-06-01 11:39:01 -07:00
Sergey Zhupanov
419a57b1bc Enabled additional compiler warnings in Eden.
Summary:
1. Enabled a number of additional C++ compiler warnings in Eden.
2. Fixed warnings-turned-errors that resulted from this change.

Reviewed By: simpkins

Differential Revision: D8132543

fbshipit-source-id: 2290ffaaab55024d582e29201a1bcaa1152e6b3e
2018-06-01 11:39:01 -07:00
Chad Austin
e939a6a821 Split Dir into its own type and move TreeInodeState out of TreeInode
Summary:
Like D7867399, split TreeInode's synchronized state into a top-level
class. This is a step towards using the type system to perform
lock-safe metadata updates.

Reviewed By: simpkins

Differential Revision: D7882648

fbshipit-source-id: 27262df8ed9137c8478c68ebf4c4f13878655754
2018-06-01 09:38:45 -07:00
Chad Austin
4411b67d52 Make max inode number calculation O(1) when shutdown is clean
Summary:
Remember the maximum inode number in a file when the Overlay is shut
down cleanly, avoiding a full Overlay scan.

Reviewed By: simpkins

Differential Revision: D7912647

fbshipit-source-id: 8adbafed15259af668a221baa829e1b1f44090d7
2018-05-31 18:46:40 -07:00
Chad Austin
5409f230eb have Overlay track nextInodeNumber_ instead of InodeMap
Summary:
The Overlay is the natural home for nextInodeNumber_ now that every
directory allocates inode numbers for its children right away. This
also simplifies serializing nextInodeNumber_ to disk in the following
diff.

Reviewed By: simpkins

Differential Revision: D8192442

fbshipit-source-id: 9b776a73c8d7653002b55985d592b1746e52f878
2018-05-31 01:46:15 -07:00
Chad Austin
99493cebda add Overlay tests for maxRecordedInodeNumber
Summary:
Before making changes to the way we record the maximum inode number,
cover it with tests.

Reviewed By: simpkins

Differential Revision: D7912059

fbshipit-source-id: 29fdc88bd74c6c07e870017d743d9fd0797baaf3
2018-05-31 01:46:15 -07:00
Chad Austin
0797ee3a35 to satisfy secfs validation suite, limit path components to 255 bytes
Summary:
Most filesystems limit path components to 255. To remain consistent,
let's have Eden do the same, at least for write operations.

Reviewed By: simpkins

Differential Revision: D8151020

fbshipit-source-id: 251da94a076f5765111c8e3d9d8a25c37682e2e3
2018-05-30 23:11:28 -07:00
Chad Austin
df4dda2dfe allow changing uid/gid on files and directories
Summary:
Relax the restriction on changing uid/gid on inodes.  We'll see what
cans of worms this opens I guess.  (Landing this is low priority, but
might be important for making some of the existing tooling in fbsource
and www work.)

Reviewed By: simpkins

Differential Revision: D7768655

fbshipit-source-id: 95fe02fe7ddc001335dbdb34e16a989a85820240
2018-05-24 00:15:54 -07:00
Chad Austin
951eb290b1 allow changing permissions on directories
Summary:
Unify how inode metadata is modified across inode types.  This allows
changing the permission bits on a directory.

Reviewed By: simpkins

Differential Revision: D7767254

fbshipit-source-id: 35e9cf652c84c7d8680cc22dec7942e94e9f5af1
2018-05-22 11:22:19 -07:00
Chad Austin
d4e186f995 store FileInode and TreeInode timestamps in the InodeTable
Summary: Store tree and file timestamps in the InodeTable so they persist across runs.

Reviewed By: simpkins

Differential Revision: D6891479

fbshipit-source-id: 1c9e6266375aceeaf293a81e73cf7f5334dbc32d
2018-05-22 11:22:19 -07:00
Yedidya Feldblum
4c0c008774 Split Futures exceptions by Promise vs Future
Summary:
[Folly] Split Futures exceptions by `Promise` vs `Future`.

* Move `Promise` exceptions into the `Promise` header.
* Move `Future` exceptions into the `Future` header.
* Split `NoState` into `PromiseInvalid` and `FutureInvalid`.
* Remove the newly-empty exceptions header.

Reviewed By: andriigrynenko

Differential Revision: D7966499

fbshipit-source-id: 2dc6d2a941493979ebf47b3e70e5cf6a6fbd33cf
2018-05-18 18:07:19 -07:00
Chad Austin
22e46cfe74 standardize on std::chrono_literals
Summary:
This is not at all clear from cppreference.com, but per
https://www.youtube.com/watch?v=dTeKf5Oek2c, it sounds to me like
recommended practice is to either:

`using namespace std::chrono_literals` (or string_literals or
whatever) to pull in a focused set of literals.

or

`using namespace std::literals` to pull in all standard literals.

or

`using namespace std` to pull in everything.

`using namespace std::literals::chrono_literals` is unnecessarily
verbose.

Adopt those standards in Eden.

Reviewed By: simpkins

Differential Revision: D8060944

fbshipit-source-id: 4d9dd4329698b7ff5e5c81b5b28780ca4d81a2a1
2018-05-18 16:51:15 -07:00
Chad Austin
2dc2a16cf2 relax InodeTable locking
Summary:
This allows multiple inodes to update their metadata simultaneously
without contending on InodeTable's locks.

Reviewed By: simpkins

Differential Revision: D7885245

fbshipit-source-id: cc8ab6cd90b7424beec314a115852e08b64026ae
2018-05-18 15:21:16 -07:00