sapling/eden/fs
Xavier Deguillard f3b0124f01 prjfs: use a shared_ptr for the context
Summary:
In order to allow request to timeout to display notifications to the user, the
`within` future method will need to be called on the various callback futures.
Unfortunately, once the timeout expires, the underlying future isn't cancelled
and stopped, but the unique pointer holding the context will be reclaimed.
Whenever the future actually completes, it will try to use an invalid pointer,
crashing EdenFS.

To solve this, switch to using a shared_ptr and copy it in the right places so
it will only be freed once all futures holding a reference to it will be gone.

I also took the opportunity to reduce the nesting a bit to make the code more
readable.

Reviewed By: kmancini

Differential Revision: D24809647

fbshipit-source-id: 987d6e5763106fabc6bed3ea00d28b129b5285a1
2020-11-10 09:59:25 -08:00
..
benchharness add 4k random writes benchmark 2020-07-14 16:13:37 -07:00
benchmarks Remove dead includes in eden 2020-10-09 15:25:47 -07:00
cli add eden debug modified command 2020-11-02 13:52:38 -08:00
config path: verify that composed paths are comprised of valid PathComponent 2020-10-22 16:24:17 -07:00
docs Some minor modifications to verbiage in documentation 2020-07-06 22:20:17 -07:00
fuse name some threads 2020-11-02 15:22:53 -08:00
inodes inodes: remove unecessary include of FuseChannel.h 2020-11-04 17:34:01 -08:00
journal avoid redundant change notifications when prior notifications have not been observed 2020-10-20 18:25:43 -07:00
model PathFuncs: allow paths on Windows to be '\' separated 2020-10-22 16:24:17 -07:00
monitor Remove dead includes in eden 2020-10-09 15:25:47 -07:00
notifications notifications: compile on Windows 2020-09-09 09:33:35 -07:00
prjfs prjfs: use a shared_ptr for the context 2020-11-10 09:59:25 -08:00
py give new thrift client access to streaming APIs 2020-10-07 23:36:40 -07:00
rocksdb Remove dead includes in eden 2019-10-11 16:45:01 -07:00
scripts move eden/scripts/ into eden/fs/ 2020-11-04 18:29:49 -08:00
service inodes: rename FUSE refcount to fs refcount 2020-11-04 17:34:01 -08:00
sqlite sqlite: allow to create in-memory sqlite database for testing 2020-10-05 15:51:18 -07:00
store always immediately fetch HgProxyHash in HgQueuedBackingStore 2020-11-02 20:18:26 -08:00
takeover inodes: rename FUSE refcount to fs refcount 2020-11-04 17:34:01 -08:00
telemetry fix compilation warnings 2020-10-26 13:43:48 -07:00
testharness inodes: rename FUSE refcount to fs refcount 2020-11-04 17:34:01 -08:00
third-party eden: support NO_OPEN support on macOS 2020-07-27 17:53:03 -07:00
utils utils: actually return an HRESULT from exceptionToHResult 2020-11-10 09:59:25 -08:00
CMakeLists.txt prjfs: move win/mount into prjfs 2020-09-22 09:09:56 -07:00