Summary:
ServerState.h is a widely-included header, as it's the dependency
injection seam used by EdenFS's inodes layer.
It included several unnecessary headers. I noticed this by seeing too
many files recompile when changing PrivHelper.h.
Replace the includes with forward-declarations.
Reviewed By: kmancini
Differential Revision: D45260059
fbshipit-source-id: 31a73030c9eb592107e8786be026e32eea80ceb4
Summary:
EdenMount used to track the set of bind mounts for a checkout. That's
long been removed, and bind mounts are now managed by the CLI (and
rectified against the mount table).
Move these vestigial EdenMount methods into EdenServiceHandler,
simplifying lifetimes and moving us closer to breaking EdenMount's
dependency on PrivHelper.
Reviewed By: kmancini
Differential Revision: D45259970
fbshipit-source-id: e9f1bb1c44fb74e49ece08416fbe1913dd1a6ea1
Summary:
We use SpawnedProcess on all platforms to start the privhelper, so we no longer
need to include sys/wait.h. This removes a conditional #include.
Reviewed By: genevievehelsel
Differential Revision: D45259880
fbshipit-source-id: dd54c60c13e34fc819eec4c4143e3c7da37329b0
Summary:
We use privhelper for NFS too, so move fs/fuse/privhelper into
fs/privhelper.
Reviewed By: kmancini
Differential Revision: D45243273
fbshipit-source-id: cfc93b324768809c87075b0085905e873c7ea88d
Summary:
I was hacking on EdenServer.h in an inner loop, and noticed my laptop
was spending time recompiling PeriodicTask every time. PeriodicTask
only needs an EventBase, so break that dependency.
Reviewed By: genevievehelsel
Differential Revision: D45788655
fbshipit-source-id: 9f61601906428dcdf4bff515c623f4b61a763d15
Summary:
It's unfortunate that changing NFS code causes most of the inode layer
to recompile. One benefit of FsChannel is we can begin to decouple
EdenMount from FUSE, NFS, and PrjFS. Remove the Nfsd3.h include from
EdenMount.h.
Reviewed By: kmancini
Differential Revision: D45167461
fbshipit-source-id: 41650390cbd053233dfe3baf051c592bc203de56
Summary:
waitForPendingWrites is general to any userspace filesystem with
asynchronous write notifications. This could even include FUSE in
writeback caching mode. To remove another ifdef, move
waitForPendingWrites into FsChannel.
Reviewed By: kmancini
Differential Revision: D45167206
fbshipit-source-id: 4daec70845864d90b94739fe2011e8ed90a6a200
Summary:
Even though PrjfsChannel has no definition on unix, we can still offer
the function. This removes an ifdef. Any attempt to PrjfsChannel
remains limited to Windows.
Reviewed By: kmancini
Differential Revision: D45167158
fbshipit-source-id: b2769ba003c3decf964c9cea06b8b4238ed5887c
Summary:
There's no need setting a test FsChannel needs to be prjfs-specific,
so remove the ifdef and introduce setTestFsChannel.
In the future, it would be nice if the FsChannel was specified at
construction so EdenMount can just be given an appropriate one during
tests.
Reviewed By: kmancini
Differential Revision: D45167055
fbshipit-source-id: 4274e827a8cf0578b88b63214558236aceb12604
Summary:
The only remaining use of EdenMount::getMountProtocol() is for
stringifying into the FinishedMount StructuredLog event. We can use
FsChannel::getName() instead. The only difference is that
FsChannel::getName() is lowercase, but I did not see anything using
the logged value.
Reviewed By: kmancini
Differential Revision: D45159419
fbshipit-source-id: 08b6a21d910bdf9c27f91c3e021c7ca8c902d478
Summary:
Also includes patch that jsgf had included, so I'm removing the patch here
UPDATE: Bumping to 0.8.4 - Includes div-by-0 potential bug in factory stats
Reviewed By: Imxset21
Differential Revision: D45779506
fbshipit-source-id: f7cd2946ae6e2c81b0a6c708165c19b218645b4c
Summary:
We almost never intend to include folly/String.h, especially in
headers, and it's a somewhat expensive header.
We sometimes use the string transformation functions in .cpp files,
but rarely in .h. Therefore, remove that dependency where we can.
Reviewed By: genevievehelsel
Differential Revision: D45672957
fbshipit-source-id: 11743156388aff5c61cfe6b46e385a95687a7a31
Summary:
I'm about to make some changes to VirtualInode. In advance, refactor a
few things I noticed.
Reviewed By: kmancini
Differential Revision: D45672797
fbshipit-source-id: 7edf67ac14fb9b98324d3ed20eecbebb5ff903c6
Summary:
I'm about to make some changes to VirtualInode. In advance, clean up
the visits with the new `match` function.
Reviewed By: mshroyer
Differential Revision: D45629562
fbshipit-source-id: f7bab01366f88c2e5a8f3d2a6d8eecef4f769d5a
Summary:
Test out `match` by porting JournalDelta to it from `std::visit`. Much
nicer!
Reviewed By: mshroyer
Differential Revision: D45629545
fbshipit-source-id: 96af83589cdfed26adf4d67f4a97dc2b375caa28
Summary:
std::visit is awkward. We typically do a lot of `if constexpr`. It's
nice to match with a set of lambda overloads instead.
Reviewed By: mshroyer
Differential Revision: D45629520
fbshipit-source-id: f4102365a97cfd92910a013ddb6475fed3863eb9
Summary: The SpawnedProcess constructor can throw in some cases. In these, we want to make sure `EdenMount::performBindMounts` returns a failed `SemiFuture`, not throw an exception as throwing an exception will lead to a mount failure while it is instead desirable to continue the mounting process.
Reviewed By: chadaustin
Differential Revision: D45759407
fbshipit-source-id: 9c190bf5e29ae4b4d94089b6d469506deb4572f6
Summary:
Use tokio's unstable `tracing` feature to name tasks after their
actors.
This also pulls in https://github.com/slawlor/ractor/pull/102 which had been merged to `main` but not yet released.
Reviewed By: slawlor
Differential Revision: D45739076
fbshipit-source-id: 3bc51d2bafb3278501b291c1391e5349845a8eb2
Summary:
In my build time benchmarking on Windows, FBString.h is a surprisingly
expensive header. It pulls in a lot of BoostPP. Remove the #include
from our Memory.h.
Reviewed By: genevievehelsel
Differential Revision: D45719327
fbshipit-source-id: b2acfa5efed6fa4e34e9c79210aaac2df0b6888e
Summary:
StringConv.h showed up as an expensive header in my build-time
benchmarking on Windows. That's because its implementation was a
template. Switching to explicit template instantiations allows us to
move the template into the .cpp.
Reviewed By: genevievehelsel
Differential Revision: D45718855
fbshipit-source-id: 66347227108c21c9d8a22456243d0fc53c4a8edf
Summary:
Eden trace has a high failure rage - especially on OD it seems.
Our CLI data has very little info on how exactly it's failing, but we recently
added eden trace to rage. So I suspect it's related.
eden trace fails when eden isn't running (desired behavior idk, maybe).
But I think we can just stop these failures and thus alerts, by skipping
trace in eden rage when eden isn't running.
Reviewed By: chadaustin
Differential Revision: D45741612
fbshipit-source-id: 29dc474ac6f89bdb026fce62e3227b04bf223423
Summary:
This diff is to stop printing the warning when the file do not exist
rkasipandian@devvm4276:fbcode default $ buck2 run mode/opt edenfsctl -- --config-dir=$EDEN_DEV_STATE --checkout-dir=$HOME/fbsource-dev rage
Buck UI: https://www.internalfb.com/buck2/2b4d15a7-8974-4c05-bfd0-4e1c4d01af10
Jobs completed: 9. Time elapsed: 0.3s.
Not reading /home/rkasipandian/.edenrc: toml config is either missing or corrupted : [Errno 2] No such file or directory: '/home/rkasipandian/.edenrc'
⠐ reading data from stdinNot reading /home/rkasipandian/.edenrc: toml config is either missing or corrupted : [Errno 2] No such file or directory: '/home/rkasipandian/.edenrc'
⠐ reading data from stdinNot reading /home/rkasipandian/.edenrc: toml config is either missing or corrupted : [Errno 2] No such file or directory: '/home/rkasipandian/.edenrc'
P726529380: https://www.internalfb.com/intern/paste/P726529380/
Reviewed By: xavierd
Differential Revision: D45718049
fbshipit-source-id: dcf4d4f2a6c41e51b8efd0493675d3be690910f1
Summary:
One of the yet to be root caused bug happens when the BlobMetadata stored in
the LocalStore contains the wrong value. On macOS in particular, this leads to
files being truncated (or too big), but it's also possible that Buck is
receiving the wrong sha1/size when querying EdenFS.
In order to confirm that the issue is related to the LocalStore, let's add a
configuration that allows the LocalStore to not be used for BlobMetadata, which
would allow to bypass the issue described above.
Reviewed By: chadaustin
Differential Revision: D45625431
fbshipit-source-id: ffb9dbc618486e490bfa6b1e0d4391749de64bfa
Summary:
Ensures that the doctor check for Windows version, done by running `cmd.exe /c ver`,
can handle non-utf-8 output and report it as a problem instead of terminating
with an unhandled exception.
Reviewed By: xavierd
Differential Revision: D45620254
fbshipit-source-id: c97642b3e48a76a2ff46ebc74d5257ad4c1fec18
Summary: VirtualInode included several things it never used. Remove them.
Reviewed By: genevievehelsel
Differential Revision: D45629434
fbshipit-source-id: db937ddba1886c0fa2461ec9f1e5842462275be9
Summary:
I need to use `std::optional<ObjectId>::operator==`, which uses
`ObjectId::operator==`.
I tried to make it hard to accidentally compare ObjectId, but that's
fighting a losing battle, so bring it back.
Reviewed By: genevievehelsel
Differential Revision: D45629405
fbshipit-source-id: 83c88afff0fb2954e40dd59204d0cfc76155fa70
Summary: This include is no longer necessary, so we can remove it.
Reviewed By: genevievehelsel
Differential Revision: D45620895
fbshipit-source-id: d8d9ae00cc38ad1331f8f6fb1f1c55b9d4276095
Summary:
One of the main objective of the LocalStoreCachedBackingStore is the ability of
configuring its policy depending on the underlying backing store. For instance,
while some backing store want to cache everything in the LocalStore, others may
only want to cache BlobMetadata. Configuring the policy per-backingstore allows
the removal and special case inside the RocksDbLocalStore of blob caching: this
is now done entirely inside the LocalStoreCachedBackingStore.
Reviewed By: chadaustin
Differential Revision: D45550480
fbshipit-source-id: 386e384f0148e38fad8d4008b4e312f360edb676
Summary: There's nothing unix-specific about these tests, so enable them on Windows.
Reviewed By: genevievehelsel
Differential Revision: D45586168
fbshipit-source-id: 5acbcbe81c5c03b16e43fc561762dbafb47696b8
Summary:
If a user relies on an environment variable in their invocation of edenfsctl,
e.g. `--config-dir=$EDEN_DEV_STATE`, then if the user accidentally leaves the
variable unset they may inadvertently specify an empty string as the path to
their config dir.
When running `edenfsctl stop`, the effect of an empty config dir path is to
shut down your main eden daemon instead of your dev daemon, so this has proven
a bit of a footgun.
Reviewed By: xavierd
Differential Revision: D45591968
fbshipit-source-id: 6df6eb8c05d94dafcaee1d6976a52310454a42d4
Summary: Do not hard-fail when edenrc is corrupted
Reviewed By: xavierd
Differential Revision: D45550209
fbshipit-source-id: 88b5e7249a7da2ef4c6df69a4c65f08b7832d8d2
Summary:
After a takeover, the new socket was initialized with a "remote
EventBase", causing stopAccepting to be asynchronous, tripping an
assertion.
There was a latent bug here: it might have been possible for a new
connection to be accepted by the old process after takeover begun.
Reviewed By: xavierd
Differential Revision: D45584154
fbshipit-source-id: cdd8118d82100bc1e19f6f19676cc2fa412b8775
Summary:
Staging an update to the latest fmt version triggered lots of build errors due to non-`const` methods on custom formatters. This fixes the `format()` methods to be `const` as they don't mutate any state anyway, as well as `parse()` methods that don't need to mutate internal state. This mitigates many future build errors.
Updates were identified and executed by using regular expression search/replacements such as:
`(constexpr auto parse\(ParseContext& [^)]*\)) \{` -> `$1 const {`
`(constexpr auto parse\(ParseContext& [^)]*\)) ->` -> `$1 const ->`
`(auto format\(.*, FormatContext& [^)]*\)) \{` -> `$1 const {`
`(auto format\(.*, FormatContext& [^)]*\)) ->` -> `$1 const ->`
Any changes to third-party code was then reverted. Some small changes detected from subsequent build errors were then applied.
Reviewed By: vitaut
Differential Revision: D45420948
fbshipit-source-id: 211bf7f3b59616eda3cd228caf4e93ff81d4fc2b
Summary: Newer versions of fmt require that you pass an iterator rather than a direct memory buffer as an output to the `format_to()` family of functions. This does that to unblock an upgrade to a newer fmt version.
Differential Revision: D45555419
fbshipit-source-id: a4e2217299ada0ab5e56942dacc9107153e4260d
Summary:
Adds an `eden doctor` check to report a problem if EdenFS is running in an
elevated process on Windows.
Reviewed By: xavierd
Differential Revision: D45169813
fbshipit-source-id: 41fd500adc1aed5641602d6dfe67cc6061d5b15d
Summary:
We don't use the Cython-based Thrift client because it never worked in
the open source build. Removing it fixes the tests when run with
nix2rpm Python binaries.
Reviewed By: xavierd
Differential Revision: D45508963
fbshipit-source-id: d6f0e162177082a78504a3a6014a8a4d32670ccc
Summary:
MountProtocol and FsChannel::getName() are the same information, so
just log the latter in this rare EDEN_BUG situation.
Reviewed By: genevievehelsel
Differential Revision: D45159212
fbshipit-source-id: 4bf4bce7889ffa704a25d7dbebcf7e13520abe1b
Summary:
A primary advantage of existentials over sum types is that they allow
they breaking dependencies. Now that channel_ is an FsChannelPtr, we
no longer need to include PrjfsChannel.h in EdenMount.h.
Reviewed By: kmancini
Differential Revision: D45109931
fbshipit-source-id: 7774804fe4056ef5b897de294707496ff722db28
Summary:
On Windows, macOS, and Linux, EdenMount::channel_ is an
FsChannelPtr. Code that wants to branch on a specific implementation
can use getFuseChannel or getNfsChannel or getPrjfsChannel, though
those will be removed later.
Reviewed By: kmancini
Differential Revision: D45109907
fbshipit-source-id: d4b3b46bd78b9487909bf1cb7c1c754e48b6e9a9
Summary:
Our build signals for the Python CLI are currently fragile because other code
pulls main_lib into complex test cases, when it really only wants the CLI's
return code constants. This decouples main_lib from these external tests.
Reviewed By: genevievehelsel
Differential Revision: D45404900
fbshipit-source-id: 4adb18030ac0ca934c6ceab7cbcd50ebd20c707d
Summary:
Fixes `buck2 run edenfsctl` by ensuring daemon.py knows how to use the
`__EDENFSCTL_RUST` environment variable, which we already plumb through our run
target, to lookup the path to the CLI. This is needed so that `edenfsctl
start` can perform mounts at startup on macOS, for example.
Reviewed By: chadaustin
Differential Revision: D45533101
fbshipit-source-id: c9df700e506409f734ca98a4fb205f962fd8ed78
Summary:
The shell scripts and awk fu did not always work correctly, so use
Python to parse the Linux mount table.
Reviewed By: mshroyer
Differential Revision: D45238375
fbshipit-source-id: 6d8918b8ecbdfe37e8ceba2b0962e5f821794140
Summary:
As a follow-up to a code review comment in a previous diff, move
acceptStopped into the EventBaseState to make it clear it's only
accessed on the EventBase thread.
Reviewed By: kmancini
Differential Revision: D45106980
fbshipit-source-id: 5bd201a0652fa2b539e18a7584fae48fd3abd54f
Summary:
FuseChannel already had an asynchronous initialize(). Lift that to
FsChannel and unify initialization of Prjfs and NFS.
Reviewed By: kmancini
Differential Revision: D45106889
fbshipit-source-id: 632ddfa275c732fc30efc1984bda43f61c37fd5e
Summary:
EdenMount shouldn't know about the vagaries of FsChannel teardown. In
fact, FuseChannel already has its own requirements, hidden behind a
unique_ptr deleter. Use the same mechanism for NFS, allowing us to
remove a .via() special-case.
Reviewed By: kmancini
Differential Revision: D44810223
fbshipit-source-id: db2f88bc3843b3842de60c5a993dfd9890dc3c15
Summary:
When unmount is called, the mount is kept alive until all the pending
ProjectedFS callbacks have completed (D45135531) to avoid use-after-free.
However, the notification callback is handled entirely in the background and
would thus not prevent the mount from being unmounted, and not being freed.
In order to fix this, we need to keep the PrjfsChannelInner alive for the
duration of the notifcation handling, which as a side effect will keep the
mount alive.
Reviewed By: mshroyer
Differential Revision: D45251808
fbshipit-source-id: e78afbc388cdf75f6d8d4e774bced8fdf841db5e
Summary:
Per Microsoft (Christian Allred), calling any Prj functions after
`PrjStopVirtualizing` will lead to use-after-free due to the internal
virtualization context being freed on `PrjStopVirtualizing`.
In EdenFS, there is a subtle cases where this may happen, in particular, if a
callback is ongoing and detached to a background thread, while
`PrjStopVirtualizing` is called as a result of `PrjfsChannel::stop`. In that case,
the callback will attempt to use a freed virtualization context and crash
EdenFS!
To prevent this, we need to make sure that `PrjStopVirtualizing` is only called
when no in-flight callbacks exits. This can be achieved by simply moving the
`PrjStopVirtualizing` into the `PrjfsChannelInner` destructor: a `shared_ptr` of
`PrjfsChannelInner` is held alive for the duration of callbacks.
After `PrjfsChannel::stop` is called, no new callbacks will be accepted due to
the `PrjfsChannelInner` field being `nullptr` thus failing IO early ensuring
that the lifetime of the mount won't be extended indefinitively.
Reviewed By: mshroyer
Differential Revision: D45135531
fbshipit-source-id: 15b25efc121ab1577c4355e07357148d122cc39f
Summary: We're seeing even more users that are crashing due to win32 errors. It seems like these sorts of E-Menu issues shouldn't crash Eden entirely. A non-functional E-Menu is better than crashing Eden entirely. Therefore, let's log these as errors for now.
Reviewed By: xavierd
Differential Revision: D45365471
fbshipit-source-id: f4092a9d44c1c5e6749e52d7e656c5de339551d3
Summary:
This will allow tests to easily block some methods to perform concurrent
operations to them. For instance, this will allow that unmount concurrently to
read will not crash EdenFS.
Reviewed By: mshroyer
Differential Revision: D45186931
fbshipit-source-id: 3bd1fa9191d6e18cec985159914c0ee03a22a107
Summary:
Background runs of eden rage are making tracing pastes. We should not make these
pastes in dry-run automation runs.
I should have caught this in code review, my bad.
This uses the same fix as D28541898. Perhaps the paste method should not work in automation.
Reviewed By: xavierd
Differential Revision: D45362138
fbshipit-source-id: c28a18bc739921b3dc6e5b906c2491427f501644
Summary:
EdenFS doesn't care about the min/max definition from Windows.h, thus define
NOMINMAX. This allows removal of a lone `#define NOMINMAX` in FaultInjector.h.
Reviewed By: janondrusek
Differential Revision: D45359806
fbshipit-source-id: 7f24bda46e9720fdac471c24ff05a32c504d3eff
Summary:
We've seen at least 1 user that crashed due to:
```
E0417 09:41:18.412118 20840 WindowsNotifier.cpp:68] TrackPopupMenuEx failed: Error (0x5a6) Popup menu already active.
F0417 09:41:18.434692 20840 WindowsNotifier.cpp:454] Exception occurred in E-Menu WndProc: TrackPopupMenuEx failed: Error (0x5a6) Popup menu already active.
```
Failures like this really shouldn't cause the entirety of Eden to crash, so let's ignore it for now.
Reviewed By: chadaustin
Differential Revision: D45130458
fbshipit-source-id: f906a17ac359f2a3c48a852d0668f70014ccd63d
Summary: `boost/regex.hpp` probably includes `windows.h` at some point, this causes a `min()` / `max()` macro conflict
Reviewed By: ispeters
Differential Revision: D45318842
fbshipit-source-id: 19fc29b03ca7dbf75fb6bfaef1787d8e73c329c2
Summary:
Code42 was known to crawl the repository without taking
into account that files are virtual. It seems that this has been corrected in the new CrashPlan 11.0.1 agent, but we will land this diff as a safety precaution to not allow them to read the repository
Reviewed By: xavierd
Differential Revision: D45282206
fbshipit-source-id: 32f77aa96745bccb36e43d4df8ff47755a7670bc
Summary:
After my previous refactoring, the memory safety bug in Nfsd3 no
longer manifests, and we can remove the unnecessary defer call.
Reviewed By: kmancini
Differential Revision: D44988749
fbshipit-source-id: 2ebd5fbf96d05ce6850fc248a642409f827ffeec
Summary:
All of the comments in RpcServer are helpful. I found a couple
opportunities to improve their clarity.
It also helps to decouple RpcStopReason from the connection status.
Reviewed By: kmancini
Differential Revision: D44988608
fbshipit-source-id: 967f35ba09533a9c8c953ef33cd595b51e7c3111
Summary:
I'm carefully reading the takeover code and noticed a few things to
improve.
Reviewed By: kmancini
Differential Revision: D44946740
fbshipit-source-id: 558441a47425b15c19ca2a6816ae2e8bf3d68019
Summary:
Fix a typo. The word capabilities hurts my eyes when I look at it too
long, but it's the correct spelling, so sed it into place.
Reviewed By: kmancini
Differential Revision: D44945525
fbshipit-source-id: 05e82c058c3015b0590b07d6458840b4c56730b6
Summary:
Out of curiosity, I'd removed a .via(getEventBase()) from
TakeoverServer, and it manifested as hard-to-understand segmentation
faults in the integration tests. The issue is that FutureUnixSocket
has EventBase affinity and must only be accessed from it.
To make this safer and more obvious, put FutureUnixSocket and the
other takeover connection state in EventBaseState.
Reviewed By: kmancini
Differential Revision: D44945469
fbshipit-source-id: add3af84a35d451385a73afb622f9b63c7cdb217
Summary:
I want to use EventBaseState in TakeoverServer, so move it from
RpcServer to eden/fs/utils.
Reviewed By: kmancini
Differential Revision: D44945418
fbshipit-source-id: b9738162c84ca20da800d3662be6271f4b492acc
Summary:
Some dead code, a judicious use of makeFutureWith, and replacement of
thenTryInline+makeAsyncTask with via+thenTry makes the implementation
of TakeoverServer easier to follow.
Reviewed By: kmancini
Differential Revision: D44945165
fbshipit-source-id: 67c7b68b892c5112620bdc1ab2a0feb7df4d1864
Summary:
For small handle types, passing by value is the correct choice,
because it indicates unconditional ownership transfer. (It also
generates slightly smaller code and is less typing.)
Reviewed By: xavierd
Differential Revision: D44927835
fbshipit-source-id: 5fefee7889e8216e46548f4801e83f51cde8b8c4
Summary:
Simplify ServerState a bit by returning a const reference to the
member shared_ptr.
Reviewed By: xavierd
Differential Revision: D44924418
fbshipit-source-id: cd5f3a17d92b677ec7be43d9a07ed38dca1a3c24
Summary:
No need to have an intermediate object to forward callbacks from
ReadCallback to RpcConnectionHandler. This simplifies both memory
management and data flow.
Reviewed By: kmancini
Differential Revision: D44860344
fbshipit-source-id: af02f7d7f331d6ff3a8c4f49abb5ba1b95db5f85
Summary:
Adding the below cli outputs to eden rage
`eden trace inode --retroactive` (this one is empty though because we don't publish events right now)
`eden trace thrift --retroactive`
`eden trace hg --retroactive`
Reviewed By: kmancini
Differential Revision: D45165616
fbshipit-source-id: f4a89377fdc489e10bd78dc4175bdf89e2992cbf
Summary: Backing out the revert of D44173515 to unblock RE with their development. I will revert my own diff instead.
Reviewed By: genevievehelsel
Differential Revision: D45190063
fbshipit-source-id: 2b14fdc2fa118719aed0f3215393d172a162639f
Summary:
UDS don't have port numbers, so trying to register their port with the
portmapper is going to fail. This can cause eden to fail to start when we
enable uds. The current portmapper version we use can't support
this, so let's just skip attempting to register uds servers with the
portmapper.
Reviewed By: xavierd
Differential Revision: D45196379
fbshipit-source-id: 584e6e04129d1ddbcc756ed66c55a03c3955705a
Summary:
Previously, the nfs.allow-apple-double was tentatively rolled out but had to be
rolled back as XCode disliked when an AppleDouble file was present on disk but
a new one couldn't be created. To avoid this issue, let's prevent AppleDouble
from being loaded from the Overlay and re-write the Overlay for directories
that contains one at the same time.
As a slight behavior change, the nfs.allow-apple-double is no longer read on
the fly but only read at startup time to avoid cases where a TreeInode is
already loaded with an AppleDouble and the config is flipped which would cause
XCode to fail to save files.
Reviewed By: chadaustin
Differential Revision: D44854105
fbshipit-source-id: 2c263411719d19eb1d457e26661620e8d6c905ce
Summary:
We don't need folly::Synchronized for the RpcServer state
machine. It's only touched from the EventBase, so make it
EventBaseState.
Reviewed By: xavierd
Differential Revision: D44860240
fbshipit-source-id: bcbc3d02e7cc5f2dc377718065c7f95eed30202d
Summary:
There's nothing TCP-specific about RpcTcpHandler, so give it a more
accurate name.
Reviewed By: xavierd
Differential Revision: D44860198
fbshipit-source-id: 55b9dc95b2caa9d87179a17435313b91bacfee49
Summary:
RpcServer can handle the accept callbacks directly. There's no need
for an intermediate object.
Reviewed By: xavierd
Differential Revision: D44860163
fbshipit-source-id: fd2d96735810a52cd287c357534c8f5bae9eee90
Summary:
I plan to use StateWrapper elsewhere so rename it to EventBaseState
and move it to the top level.
Reviewed By: xavierd
Differential Revision: D44860040
fbshipit-source-id: fb03b3b726df50099bcce144e343be0caeeaf1be
Summary:
There is no need for an intermediate object: RpcTcpHandler can handle
the write callback methods directly.
Reviewed By: xavierd
Differential Revision: D44860027
fbshipit-source-id: fe1f44b83a371291a21a3b1b26422bef5cbbf2a0
Summary:
To simplify RpcServer further, assert that removal of the accept
callback is a synchronous operation. Previously, it wasn't, because
specifying any EventBase in addAcceptCallback created a RemoteAcceptor
which scheduled operations on the other EventBase.
Reviewed By: xavierd
Differential Revision: D44853408
fbshipit-source-id: 9369cdcb0bd8450d42e195c15738362d4a53d2e7
Summary:
I'm trying to track down a subtle lifetime rule violation in
EdenMount. While reading RpcServer, I noticed a few possible
simplifications.
Reviewed By: xavierd
Differential Revision: D44849773
fbshipit-source-id: 4c27c47a7e2c211dcd040acce955e9b2f617b55b
Summary:
This removes an ifdef _WIN32 in mount shutdown by standardizing the
takeover logic on all three platforms.
Projected FS doesn't support takeover, but removing ifdefs allows
simplifying the control flow and unblocking NFS or other FsChannel
implementations on Windows.
Reviewed By: kmancini
Differential Revision: D44737273
fbshipit-source-id: fc6b718e01698ef3700b5c198750c0e3b1f62063
Summary:
By moving NFS's StopData behind FsStopData, the std::variant and
runtime checks during takeover can be unified into one path. The next
diff will do the same for Windows.
Reviewed By: kmancini
Differential Revision: D44737160
fbshipit-source-id: 19ca623f90b367d25385f177cafa44d7bf7ebb62