sapling/eden/fs/service
Adam Simpkins 4dc59b856b ensure that most thrift calls cannot access initializing mounts
Summary:
This updates the `EdenServer` class so that the existing `getMount()` and
`getMountPoints()` APIs only return mounts that have finished initializing.

These APIs are primarily used by the thrift interfaces.  In most cases the
callers did not intend to operate on mounts that were still initializing, and
doing so was unsafe.  The code could potentially dereference a null pointer if
it tried to access the mount's root inode before the root inode object had
been created.

New `getMountUnsafe()` and `getAllMountPoints()` APIs have been added for call
sites that explicitly want to be able to access mounts that may still be
initializing.  Currently the `listMounts()` thrift API is the only location
that needs this.

Reviewed By: strager

Differential Revision: D13981139

fbshipit-source-id: e6168d7a15694c79ca2bcc129dda46f82382e8e9
2019-03-06 20:33:42 -08:00
..
oss print the build version when edenfs is starting 2018-06-26 12:07:08 -07:00
test Forward systemd startup logs to 'eden start' 2018-12-07 17:07:08 -08:00
__init__.py enable Black python formatting and apply to eden 2018-05-09 21:37:07 -07:00
.gitignore watchman: pull in thrift in the oss build for eden support 2019-02-04 21:37:47 -08:00
client.py Update pyre version for eden 2019-03-04 13:03:03 -08:00
CMakeLists.txt eden: have priv helper load the fuse kext if needed 2019-01-17 18:52:53 -08:00
eden.thrift add dtype as an optional return value from glob 2019-02-19 11:26:26 -08:00
EdenCPUThreadPool.cpp Rename UnboundedQueueThreadPool to UnboundedQueueExecutor and add a ManualExecutor variant 2018-08-03 13:21:59 -07:00
EdenCPUThreadPool.h Rename UnboundedQueueThreadPool to UnboundedQueueExecutor and add a ManualExecutor variant 2018-08-03 13:21:59 -07:00
EdenError.cpp update eden to be more liberal when parsing BinaryHash arguments 2018-03-20 16:47:12 -07:00
EdenError.h run clang-format across all C++ files 2017-11-03 16:02:03 -07:00
EdenServer.cpp ensure that most thrift calls cannot access initializing mounts 2019-03-06 20:33:42 -08:00
EdenServer.h ensure that most thrift calls cannot access initializing mounts 2019-03-06 20:33:42 -08:00
EdenServiceHandler.cpp ensure that most thrift calls cannot access initializing mounts 2019-03-06 20:33:42 -08:00
EdenServiceHandler.h add thrift APIs to the fault injection framework 2019-02-15 19:27:17 -08:00
fb-edenfs@.service rename and relocate eden and edenfs 2019-02-21 15:00:47 -08:00
main.cpp add a flag to report start-up success before finishing mounts 2019-03-06 20:33:41 -08:00
PrettyPrinters.cpp report the mount state in listMounts() 2019-01-02 12:58:08 -08:00
PrettyPrinters.h report the mount state in listMounts() 2019-01-02 12:58:08 -08:00
StartupLogger.cpp eden: no pipe2 on macos, manually CLOEXEC 2018-12-15 19:11:05 -08:00
StartupLogger.h add a flag to report start-up success before finishing mounts 2019-03-06 20:33:41 -08:00
streamingeden.thrift adopt new thrift streaming API 2018-09-20 12:54:23 -07:00
StreamingSubscriber.cpp Make EventBase destruction callbacks safely cancellable 2019-01-24 15:57:39 -08:00
StreamingSubscriber.h Make EventBase destruction callbacks safely cancellable 2019-01-24 15:57:39 -08:00
Systemd.cpp Make 'eden start' run a bare minimum systemd service (opt-in) 2018-12-06 16:01:43 -08:00
Systemd.h Make 'eden start' run a bare minimum systemd service (opt-in) 2018-12-06 16:01:43 -08:00
ThriftUtil.h folly::Optional -> std::optional 2018-10-23 18:51:59 -07:00