Commit Graph

1740 Commits

Author SHA1 Message Date
Richard Barnes
7b14f73cf8 Remove extra semi colon from eden/fs/inodes/FileInode.cpp
Summary:
`-Wextra-semi` or `-Wextra-semi-stmt`

If the code compiles, this is safe to land.

Reviewed By: palmje

Differential Revision: D51995015

fbshipit-source-id: c92e3c06ae30b98afdcb204c52db8ea3a4e28729
2023-12-08 17:29:10 -08:00
Nikita Patskov
e2a08b0dab Remove explicit key
Summary: Title

Reviewed By: jbardini

Differential Revision: D51813530

fbshipit-source-id: dd472fd3fc937568a1c1b214faa6504878a6c116
2023-12-04 10:03:02 -08:00
David Tolnay
47c8f223f2 update platform010 & platform010-aarch64 symlinks
Summary:
Release notes: https://blog.rust-lang.org/2023/10/05/Rust-1.73.0.html

This release is coupled with an update of the `anyhow` and `thiserror` crates because the unstable standard library API for backtraces has changed.

Fbcode changes:

- `feature(default_free_fn)` deleted (D50300881)
- `noop_method_call` lint becomes warn-by-default (D50486032, D50516201)
- stronger `invalid_reference_casting` detection (D50488164)
- `feature(unix_chown)` has been stabilized
- `feature(provide_any)` and `std::provider` deleted
- `clippy::unwrap_or_else_default` renamed to `clippy::unwrap_or_default`
- type inference ambiguities (D51780425)
- `nu-command` build error (D51779062)

Reviewed By: AndreasBackx, shayne-fletcher

Differential Revision: D50294321

fbshipit-source-id: 0fac87f6ba072ad029f9ce41ce94ed813e855b20
2023-12-02 13:52:50 -08:00
Xavier Deguillard
8e515929c9 fuse: use the FS channel thread pool in FUSE
Summary:
This removes the last unsafe QueuedImmediateExecutor from the code (excluding
tests).

In the tests, a global CPU executor had to be used instead of a ManualExecutor
due to the FuseChannel code relying on threads to read from the FUSE
filedescriptor, the timing of which would make tests flaky.

Reviewed By: jdelliot

Differential Revision: D51302394

fbshipit-source-id: f520bf4d50ce8228a2470e21b74b4a713ab7e710
2023-11-30 13:41:03 -08:00
Andres Suarez
30e1a637f3 Update autocargo component on FBS:master
Reviewed By: dtolnay

Differential Revision: D51692353

fbshipit-source-id: 44864a348711875983de81758bbe05b46ad4c604
2023-11-29 18:35:29 -08:00
Genevieve (Genna) Helsel
4dcd47812f split LMDBFileContentStore from LMDBInodeCatalog
Summary: This was followup code review from the initial implementation, to improve readability. There is no behavior change here, just moving/renaming some things.

Reviewed By: kmancini

Differential Revision: D51375399

fbshipit-source-id: ebfde4a3bbb67f1efb421c7e385430626b00d212
2023-11-29 10:49:40 -08:00
Xavier Deguillard
36089152d7 nfs: move NFS thread pool to ServerState
Summary:
I'm planning on re-using this thread pool in both PrjFS and FUSE, let's thus
move it to a more generic location.

Reviewed By: genevievehelsel

Differential Revision: D51302395

fbshipit-source-id: 39a503fd31a7b7464fc0a38f8d4152e33808293f
2023-11-28 12:57:11 -08:00
Xavier Deguillard
4f419514b1 inode: revamp blob loading
Summary:
The blob loading code used to rely on an unsafe detached future that could lead
to deadlocks. To fix this, the code needs to be reworked quite significantly
to allow the loading future to be chained and added to a proper executor by the
calling context.

Simply chaining the future is unfortunately not sufficient: it prevents the
loading context from being interrupted by a truncation, this can be solved by
using a `folly::collect` with both the promise and the load future. In the case
where the load is interrupted, the promise will be set and the collect will
early complete. Since `folly::collect` is only early completing when one of the
future fails, some boilerplate code had to be added to handle the
`BrokenPromise` case.

However the solution above exposes another very subtle issue: if the returned
future is dropped, the loading will never complete but the inode will stay in
its loading state. Thus future loads will hang waiting for a promise that will
never be set. Solving this can be done by detecting when the loading future is
dropped and simply resetting the loading state.

Reviewed By: jdelliot

Differential Revision: D50415722

fbshipit-source-id: 33833b744ca0bcacfc7bc8c53a463dd99a327889
2023-11-28 12:57:11 -08:00
Genevieve (Genna) Helsel
eeb069e587 add missing LMDBInodeCatalog test target
Summary: Somehow forgot to add the target for this test file...

Reviewed By: jdelliot

Differential Revision: D51375040

fbshipit-source-id: 76d153cdd599218f3e2bb86a650422a767b324e6
2023-11-15 17:40:57 -08:00
Andres Suarez
5815940e22 Update (and unfork) tracing from 0.1.37 to 0.1.40
Summary:
Replaces the various `tracing` forks for [tokio-rs/tracing#2407] with
crates-io releases containing those changes.

[tokio-rs/tracing#2407]: https://github.com/tokio-rs/tracing/pull/2407

Reviewed By: capickett, davidbarsky

Differential Revision: D51266382

fbshipit-source-id: 5ad0b7b9477e5fa450e52c639357fe485e0e89ff
2023-11-13 18:18:35 -08:00
Genevieve (Genna) Helsel
4f8e90b558 LMDBInodeCatalog + LMDBFileContentStore
Summary:
X-link: https://github.com/facebookincubator/velox/pull/7542

ties all of the pieces together. The bulk of the net-new logic is in `OverlayFile`, with the LMDB stuff being ported from other implementations or just delegating calls to other classes.

Reviewed By: kmancini

Differential Revision: D46914322

fbshipit-source-id: 3434b71c92ece6b94a3c08828df286b04152d50f
2023-11-13 12:47:14 -08:00
Genevieve (Genna) Helsel
043321ba15 LMDBDatabase + LMDBStoreInterface
Summary:
This is mostly a copy of `SqliteDatabase`, `SqliteConnection`, and `SqliteTreeStore` (with a name change to the more generic `StoreInterface`)

`LMDBStoreInterface` implements two different types of functions, those mapping to `FileContentStore/InodeCatalog`, and those mapping to `OverlayFile`

Reviewed By: kmancini

Differential Revision: D47001908

fbshipit-source-id: 2f1ba34d2900f910e8c6c49a2fc4e298f5a7561d
2023-11-13 12:47:14 -08:00
Saul Gutierrez
b93f88fb4a symlinks: fix bug when resolving symlink paths on cycles
Summary: On D50793884 there was a mistake where trying to resolve symlink cycles would make EdenFS time out due to `resolveSymlinkPathImpl` being stuck on the cycle. This was caused by not using the `remainingRecursionDepth` parameter.

Reviewed By: xavierd

Differential Revision: D51160001

fbshipit-source-id: 269713ec96db2820a99ededbc0667439ba98b2f1
2023-11-09 09:56:38 -08:00
Xavier Deguillard
8f95245002 inodes: return ImmediateFuture from loadChildLocked
Summary:
I'm trying to better understand this whole code and will be starting by merging
loadChild and loadChildLocked, who seemingly do the exact same thing but
slightly differently. First step will be to use ImmediateFuture since most of
the callers already were converting the returned Future to an ImmediateFuture.

Reviewed By: kmancini

Differential Revision: D50902991

fbshipit-source-id: e88cfbe25341b4b1320945e464870aaef2132bff
2023-11-07 11:18:21 -08:00
Xavier Deguillard
640cb7767e inodes: remove remaining QueuedImmediateExecutor from EdenMount
Summary:
These were the last ones and could be converted to an ImmediateFuture without
too much trouble.

Reviewed By: kmancini

Differential Revision: D50720494

fbshipit-source-id: eb97946ad07aaa7a3b90f5b6bf0b7f6ea6122f7b
2023-11-07 11:18:21 -08:00
Saul Gutierrez
9f9b5559ad symlinks: fix symlinks containing paths composed of other symlinks on Windows
Summary:
There was an issue on EdenFS when trying to determine the type of a symlink: if the target path contained symlinks in its path EdenFS incorrectly would try to internally read the unresolved path, which it was incapable of.

For instance, if the directory structure looked somewhat like this:
```
├── a -> b/y
├── b -> x
└── x
    └── y
        └── z
```
trying to show the contents of `a` would fail as EdenFS would mark that symlink as a file instead of a directory symlink.

That is fixed by this diff by adding a method for resolving the target before internally trying to read the target of a symlink.

Reviewed By: xavierd

Differential Revision: D50793884

fbshipit-source-id: 920a0b4ee6f4f1b9a9fd1143608f2d42b5ca2299
2023-11-07 10:07:50 -08:00
Christopher Ponce de Leon
0972cf92cb Revert D51029740: Namespace doesn't need to be followed by semicolon
Differential Revision:
D51029740

Original commit changeset: 177e3f6e6b0a

Original Phabricator Diff: D51029740

fbshipit-source-id: c71ff386342902f2cfa6552d6a834ea3f2475e32
2023-11-06 08:37:37 -08:00
Richard Barnes
21f86621c2 Namespace doesn't need to be followed by semicolon
Summary:
Auto-generated with
```
fbgs "}; // namespace" -l | sort | uniq | sed 's/fbsource.//' | xargs -n 50 sed -i 's_}; // namespace_} // namespace_'
```

Reviewed By: dmm-fb

Differential Revision: D51029740

fbshipit-source-id: 177e3f6e6b0ab7e986b1147952cd5e2f59d4b1fc
2023-11-06 08:02:11 -08:00
Xavier Deguillard
d42bc3f88b inodes: replace manual try/catch with makeFutureWith
Summary:
makeFutureWith is strictly equivalent to a try/catch but requires less code to
handle exceptions, use it.

Reviewed By: genevievehelsel

Differential Revision: D50902990

fbshipit-source-id: 8d887e2c0efd97244763b27c2b3ec2b20145e97e
2023-11-03 14:01:58 -07:00
Saul Gutierrez
07250d30aa symlinks: add helper functions for resolving symlink paths
Summary: Adds some helper functions that will be used for resolving symlinks on D50793884

Reviewed By: xavierd

Differential Revision: D50888103

fbshipit-source-id: dadf02e4635cc86ef9470c4f925386711d42d0e6
2023-11-02 13:43:33 -07:00
John Elliott
438a3f43ba Enable warnings for shadow definitions for clang/gcc
Summary:
Eden builds allow for shadow declarations to hide members, parameters, etc.

This can lead to subtle bugs and frustrations. Lets fix that. This first update enables shadow warngings for most problematic types of shadows. With errors on by default, this will block local and CI builds.

Reviewed By: xavierd

Differential Revision: D50434604

fbshipit-source-id: 976bd2e86c620f1f0e62e19867c81840fee645c9
2023-10-27 16:29:22 -07:00
Mark Shroyer
a3bce3c4bd Factor PrjFS on-disk state functions out of WindowsFsck
Summary:
Moves populateOnDiskChildrenState out of the Windows FSCK implementation and
into a separate library target for re-use in the PrjFS background scrubber.

In doing so, this renames newly exported interfaces.  We also add a paramter to
optionally use FIND_FIRST_EX_ON_DISK_ENTRIES_ONLY to be usable while the
virtualization provider is running.

Reviewed By: genevievehelsel

Differential Revision: D50670155

fbshipit-source-id: b8d339da15fe7f3a741168357c7481258c261b66
2023-10-27 14:53:17 -07:00
Saul Gutierrez
7f7f4c4a32 symlinks: fix bug where EdenFS errors out if target does not exist
Summary: There was a bug on Windows symlinks where EdenFS would error out if the target symlink would not exist and the target path was inside of the EdenFS mount. The cause was not handling the errors from `getTreeOrTreeEntry`

Reviewed By: genevievehelsel

Differential Revision: D50610932

fbshipit-source-id: 17333a6afe7ab577d21bc9d59883c8be7b412571
2023-10-24 14:40:38 -07:00
Xavier Deguillard
ef62822cf1 inodes: remove QueuedImmediateExecutor from checkout
Summary:
This removes the remaining QueuedImmediateExecutor from checkout, most of the
computation will now run on the Thrift executor which isn't an inline executor
and thus doesn't suffer from deadlocks.

Most of this diff are in tests are these need to be taught to use the
ImmediateFuture instead of the folly::Future.

Reviewed By: genevievehelsel

Differential Revision: D50347460

fbshipit-source-id: 79fcfd2494371c1a9422692862356162b64e11a1
2023-10-24 12:03:55 -07:00
Xavier Deguillard
048eec83e8 inodes: Use ImmediateFuture in most part of checkout
Summary:
The checkout code is a heavy user of `QueuedImmediateExecutor` due to relying
on `folly::Future`, the immediate executor is used to convert `ImmediateFuture`
onto `folly::Future`. Unfortunately, this transformation is unsafe and leads to
deadlocks.

The full migration of checkout to `ImmediateFuture` is done in the next diff,
and as a result still relies on `QueuedImmediateExecutor` in `EdenMount`.

As part of this diff, the CheckoutAction is greatly simplified, from relying on
refcounts and `Promise`, the code now merely makes use of future chaining, thus
making it easier to read.

Reviewed By: genevievehelsel

Differential Revision: D50347461

fbshipit-source-id: 8159f523f6fbe4414b99ecb924ba0446f7edeb6e
2023-10-24 12:03:55 -07:00
Xavier Deguillard
f713eef690 inodes: remove background future from VirtualInodeLoader
Summary:
In D50227150, the QueuedImmediateExecutor was removed from the
VirtualInodeLoader to eliminate a potential deadlock, this however force the
caller to pass down an executor. Instead, a slightly different approach can be
taken: let's simply chain the futures and return an
`ImmediateFuture<vector<T>>`  instead of returning a `vector<SemiFuture<T>>`.

The outcome will be similar: the futures will run on the Thrift executor, but
is now done implicitely in this change.

Reviewed By: genevievehelsel

Differential Revision: D50347463

fbshipit-source-id: cf7023e9eee53e14955b852b44c1902b348dab61
2023-10-24 12:03:55 -07:00
Xavier Deguillard
ababdd8e4b inodes: pass down the RelativePath from VirtualInodeLoader
Summary: Various Thrift calls need the path of the VirtualInode, let's pass it down.

Reviewed By: genevievehelsel

Differential Revision: D50281108

fbshipit-source-id: 49744227b223492ce0354f43cabe1508a33341ca
2023-10-23 09:47:08 -07:00
Xavier Deguillard
c7a6ca8a39 sanity: remove some unecessary QueuedImmediateExecutor includes
Summary:
This is just some general cleanups as the QueuedImmediateExecutor users are
dwindling down.

Reviewed By: genevievehelsel

Differential Revision: D50347465

fbshipit-source-id: 30891010664cd20234427c264f687007647fd257
2023-10-18 14:31:06 -07:00
Xavier Deguillard
fbe6e2a26a inodes: remove use of QueuedImmediateExecutor in VirtualInodeLoader
Summary:
Using QueuedImmediateExecutor can lead to deadlocks as seen in D50199539, let's
instead make use of an actual executor that the caller passes. When called in
the context of a Thrift call, the Thrift executor is passed in as the rest of
the Thrift handling is already done in that executor.

Reviewed By: genevievehelsel

Differential Revision: D50227150

fbshipit-source-id: 042617afa1e05fe602807caab7b6419e18ba6848
2023-10-16 14:04:39 -07:00
Mark Shroyer
ce497734fb Add integration test for retryable update
Summary:
When enabled, the configuration added in D47099273 causes error conflicts
reported by EdenFS during update to leave the repository in an "unfinished
update" state.  The original intent of this configuration was to deal with
network errors, but this behavior also applies to errors caused by EdenFS being
unable to remove a locked placeholder file.

This adds integration tests to ensure that a successfully retried update can
bring the repository to the desired end state.  These tests reveal that that
resuming update to deal with a failed placeholder invalidation doesn't yet
work, so some assertions are currently commented out with a TODO.

Reviewed By: genevievehelsel

Differential Revision: D50250253

fbshipit-source-id: b88e47d91819167f5f079c676b4026f3e02f7606
2023-10-13 10:28:23 -07:00
Saul Gutierrez
0ba6615c18 symlinks: make symlinks appear as modified with fake symlinks
Summary: Before all the EdenFS symlink changes on Windows, replacing a "fake" symlink with an actual symlink would make that file show up as modified. This diff reverts that behavior.

Reviewed By: kmancini

Differential Revision: D49755711

fbshipit-source-id: 03ea79e9af59264a2c1303240494a862d140f86f
2023-10-12 18:20:15 -07:00
Facebook GitHub Bot
df8fba6e6d Re-sync with internal repository
The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging.
2023-10-11 22:09:00 -07:00
Xinyi Wang
070fc3a461 fully separate GlobNode and GlobTree
Summary: As title, this diff fully separate GlobNode and GlobTree, GlobTree only does Glob on tree and do not depend on inode. GlobNode and GlobTree both use shared utilities to minimize code duplication

Reviewed By: kmancini

Differential Revision: D49998533

fbshipit-source-id: 6323cacd58aa68678ee348620956a967e719b7aa
2023-10-10 14:54:13 -07:00
Genevieve (Genna) Helsel
a8045b1ee1 rename IFileContentStore -> FileContentStore
Summary: This unifies the naming convention between `FileContentStore` and `InodeCatalog`

Reviewed By: kmancini

Differential Revision: D48584876

fbshipit-source-id: 316f1d1e49228036338a0ae4371b7d129357f884
2023-10-10 11:03:56 -07:00
Genevieve (Genna) Helsel
4109c3c560 rename FileContentStore -> FsFileContentStore
Summary: `FileContentStore` is too generic of a name with the introduction of another implementation (`LMDBFileContentStore`), so rename it to `FsFileContentStore`

Reviewed By: kmancini

Differential Revision: D48581932

fbshipit-source-id: e3bc57733399c095f62a38839305f2d37c3e8a47
2023-10-10 11:03:56 -07:00
Genevieve (Genna) Helsel
600a6c1526 change FileContentStore to return variant
Summary: In preparation for `LMDBFileContentStore`, this diff extends the `IFileContentStore` class to hold either a `folly::File` or an `InodeNumber`.  This logic follows from D48569910

Reviewed By: kmancini

Differential Revision: D48570175

fbshipit-source-id: 9b046aff027896a77729bc84f4c96c683b7d5107
2023-10-10 11:03:56 -07:00
Genevieve (Genna) Helsel
e0d0c0fae0 extend OverlayFile to hold folly::File or InodeNumber
Summary:
In preparation for `LMDBFileContentStore`, this diff extends the OverlayFile class to hold either a `folly::File` or an `InodeNumber`.

`FsFileContentStore` returns a `folly::File` which wraps an open `fd` to the raw file on disk. This allows for direct manipulation of the data without a trip through the `FsFileContentStore`. It also acts as a way to refcount any open IO requests to the underlying overlay storage (see: D17973664)

`LMDBFileContentStore` doesn't have the ability to return a file descriptor for direct manipulation, so instead it will return its key and operations to the `OverlayFile` will query `LMDBFileContentStore` on demand using the given `InodeNumber`.

In theory, `LMDBFileContentStore` doesn't need the concept of an `OverlayFile` since it doesn't need to refcount open file handles, but adapting the class to work with the `LMDBFileContentStore` model is cleaner than working around `OverlayFile`/`OverlayFileAccess` class.

The following images depict the two different architectures

{F1075774500}

 {F1075774523}

Reviewed By: kmancini

Differential Revision: D48569910

fbshipit-source-id: 2f171ede0c4ac168ca01bb1c65dc9d401edc4681
2023-10-10 11:03:56 -07:00
Xinyi Wang
0e86e4ccf0 create GlobTree class that doesn't depend on inode
Summary:
See why on previous diff

Now with this diff GlobTree is independent of inode

Reviewed By: kmancini

Differential Revision: D49933175

fbshipit-source-id: 1551a2b7e054df5df88ac37fbf0bf45f91e34548
2023-10-10 10:06:24 -07:00
Mark Shroyer
c3f537ff2f Split processAbsentCheckoutEntry from processCheckoutEntry
Summary:
Split the code dealing with checkout entries absent from TreeInode state into a
separate function to make processCheckoutEntry slightly more comprehensible.

Reviewed By: xavierd

Differential Revision: D49961307

fbshipit-source-id: 8744f9f595f39402689773e85d285c9d628f6a9f
2023-10-06 14:12:29 -07:00
Andres Suarez
f24cbe72d6 Update and pin anyhow to 1.0.72
Summary:
anyhow-1.0.73 [uses][1] the new `Error::provide` API. This API is
available starting in Rust 1.73. This means that if you want backtraces,
you need one:

- anyhow-1.0.72 & Rust 1.72
- anyhow-1.0.73 & Rust 1.73

Since we're still on 1.72, pin the version to avoid accidentally losing
backtraces.

There are no real changes between anyhow-1.0.71 and anyhow-1.0.72. But
update to anyhow-1.0.72 so that we're right up until the point where we
get backtrace support.

[1]: https://github.com/dtolnay/anyhow/pull/319

Reviewed By: shayne-fletcher

Differential Revision: D49970958

fbshipit-source-id: 1193611e6d16bc840e63b689e932ea3d33562152
2023-10-05 15:20:03 -07:00
Xinyi Wang
f762af7673 a hacky way to separate inode and tree evaluate in GlobNode 1/n
Summary:
This is a stack to refactor GlobNode out of inode directory as much as possible.
I'm working on fine grained watchman subscription and i need to use GlobNode for globbing, which will have fs files depend on inode files. According to Katie, we want inode to be the top level.

Since the api im using won't require inode, the plan is to move the part that doesn't require inode into utils and have the inode glob search remain in inode

To split inode and tree implementation in this file, we need to make `evaluateImpl` and `evaluateRecursiveComponentImpl` stop referring to inodes, which is very hard without rewriting the methods because both methods do double recursion inside.

This code is hacky as it reuses runtime error for lines that we know will never reach during compile time. But I think this file is already using this hacky way multiple times https://www.internalfb.com/code/fbsource/[6cf48e74661705c6aefc18ebaecd7e229d71cb99]/fbcode/eden/fs/inodes/GlobNode.cpp?lines=122

I think with modern c++ we can probably get away this exception with constraints. But I'm not confident to do big refactor on this file for now

Reviewed By: kmancini

Differential Revision: D49900357

fbshipit-source-id: a769137238da78aba1da2720f9f1fc07f7e3ad6e
2023-10-05 14:37:15 -07:00
generatedunixname89002005287564
f19537e70e eden (3693101019543887448)
Reviewed By: xavierd

Differential Revision: D49860603

fbshipit-source-id: 7dc8d663b65e89d859ef692265873ee7b472fba5
2023-10-05 01:11:20 -07:00
Genevieve (Genna) Helsel
51670c5bfa thread ObjectFetchContext to StatsFetchContext via DiffContext
Summary: In order to pass the `requestInfo` map to deeper layers, thread the Thrift layer `ObjectFetchContext` to `DiffContext` and `StatsFetchContext`. This is not consumed anywhere yet, but will passed to the `sapling_backing_store` in follow up diffs. This is part of a broader effort to thread a common client identifier from scm clients (`sapling` and `edenfs` to Mononoke)

Reviewed By: jdelliot

Differential Revision: D49716042

fbshipit-source-id: b5df9754058e1f1585954ff6c25bbafa9aa820c1
2023-10-03 14:02:07 -07:00
Genevieve (Genna) Helsel
d6a9c0b3fe thread ObjectFetchContext to CheckoutContext
Summary: In order to pass the `requestInfo` map to deeper layers, thread the Thrift layer `ObjectFetchContext` to `CheckoutContext`. This is not consumed anywhere yet, but will passed to the `sapling_backing_store` in follow up diffs. This is part of a broader effort to thread a common client identifier from scm clients (`sapling` and `edenfs` to Mononoke)

Reviewed By: jdelliot

Differential Revision: D49716030

fbshipit-source-id: 7b079e554711ec610dd919243c7e459b2737fa48
2023-10-03 12:10:14 -07:00
Saul Gutierrez
36c9dcee81 symlinks: resolve issue with status and symlinks disabled
Summary: Some users reported seeing files that were supposed to be symlinks when having symlinks disabled. This was caused by the initial mode for those "symlinks" being symlinks; with symlinks disabled this symlink mode was supposed to be ignored and the file should have been treated as a regular file.

Reviewed By: kmancini

Differential Revision: D49610768

fbshipit-source-id: 73b78cc1b5f278ac2dd871bf9454fec63c723979
2023-09-29 10:56:43 -07:00
Katie Mancini
bdb6fdb615 fail startup if the localstore fails to open
Summary:
Currently EdenFS is swallowing errors opening the local store. None of the
mounts will be mounted, but EdenFS will report that start was successful.
Previously, errors opening the local store would cause startup to fail.
D38190050 accidentally caused this behavior.

We want to go back to EdenFS more explictly failing to start because this is
clearer to users, and EdenFS will not be able to work with out it's local store.

I discovered a potential cause of graceful restart leaving behind stale mounts
while putting the start failure behavior back:

If EdenFS fails in startup sometime between receiveing takeover data and
creating setting up a mount object, that mount will be left stale. We probably
don't want that, but fixing that is more complicated, and it's also very old
behavior (happened before D38190050), so I'm going to delay the fix on that.

Reviewed By: MichaelCuevas

Differential Revision: D48813074

fbshipit-source-id: 3c129c48b423afb2b0224f1eec1031c26c8968c6
2023-09-28 15:43:27 -07:00
Saul Gutierrez
af283917f0 symlinks: fix bug with POSIX-style paths on Windows symlinks
Summary: Before this change there was a bug where trying to read symlinks with POSIX-style paths (e.g., `/foo/bar`) would fail. This applied both to reading symlinks directory or trying to list the contents of their parent directories.

Reviewed By: genevievehelsel

Differential Revision: D49601495

fbshipit-source-id: 403d06c580d676d61fb6bd8233e5ac45b072c2df
2023-09-25 11:50:49 -07:00
John Elliott
5ae6da8b04 Add counters to Overlay to track hits and misses
Summary:
We would like to know how effective our various caching entities are. Here we are adding counters in Overlay to track hits and misses when loading an overlay directory.

File operations in the Overaly are only used when the overlay checker is being ran - as such not adding counters for those.

Reviewed By: MichaelCuevas

Differential Revision: D49552392

fbshipit-source-id: 1d2e699b4b9c5a1bad3d47ef1e7945a5f7f37999
2023-09-22 15:14:27 -07:00
John Elliott
120577ce98 Added counters to InodeMetadataTable to track hits and misses
Summary: We would like to know how effective our various caching entities are. Here we are adding counters in EdenStats to track lookup hits and misses in InodeMetadataTable.

Reviewed By: MichaelCuevas

Differential Revision: D49548923

fbshipit-source-id: bd48b71213ecb28d6f0316a7d69955b80aefdb37
2023-09-22 15:14:27 -07:00
John Elliott
e961709029 Remove header dependency in InodeMap.h
Summary: To aid in build times, switched to using forward declarations to remove an depedenciny on EdenStats.h in IndoeMap.h.

Reviewed By: chadaustin

Differential Revision: D49546029

fbshipit-source-id: 1306d28465527e7d6109d413f7e9f4ecb2e7e74e
2023-09-22 15:14:27 -07:00