sapling/eden/fs
Xavier Deguillard 49b103584c nfs: call incFsRefcount when giving an InodeNumber
Summary:
During an `hg update`, all the loaded inodes are unloaded and forgotten, except
the ones that had a positive refcount, these are forgotten when FUSE calls the
`forget` API. For NFS, this `forget` API doesn't exist but the protocol relies
on file handle to stay valid for some time. The duration for which a file
handle need to stay alive depends on several factor. The root one needs to
always be valid, the rest relies on the lookup cache that the client keeps.
This lookup cache is invalidated when the mtime for the parent directory
changes, but mtime changes are often not immediately detected, as attributes
are cached client side with the `acdirmin` and `acregmin` for directories and
files.

For now, this diff doesn't attempt to deal with files being out of date right
after an `hg update`, it merely accounts for the NFS client being able to pass
old file handles to EdenFS. The astude reader will have noticed that
InodeNumber are never reclaimed for now, for that, a time-based mechanism will
need to be added to forget InodeNumbers that have expired.

Reviewed By: kmancini

Differential Revision: D27405295

fbshipit-source-id: af4a4ce9e31bfcc335608da91f0247b50ab87b3f
2021-03-30 19:10:58 -07: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 Allow re-enabling feature Prefetch Profiles 2021-03-22 02:50:32 -07:00
cli_rs make input loop eden top 2021-03-08 18:03:57 -08:00
config nfs: move servicing of NFS callback to a threadpool 2021-03-29 09:20:33 -07:00
docs run linter in eden/fs/docs 2021-01-25 16:13:54 -08:00
fuse privhelper: add XDR types for macOS mount arguments 2021-03-30 10:16:14 -07:00
inodes nfs: call incFsRefcount when giving an InodeNumber 2021-03-30 19:10:58 -07:00
journal journal: coalesce no-op checkout events 2021-02-26 16:28:44 -08:00
model optimize HgProxyHash some and make loading from LocalStore explicit 2021-03-12 10:42:46 -08:00
monitor Apply clang-format update fixes 2021-01-10 10:06:29 -08:00
nfs nfs: allow serializing std::optional 2021-03-29 09:20:33 -07:00
notifications notifications: support Windows 2020-11-11 09:37:56 -08:00
prjfs telemetry: switch to using quantile stats instead of histograms 2021-02-14 16:37:08 -08:00
py Add annotations to eden/fs/py/test/dirstate_test.py 2021-03-17 14:15:25 -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 nfs: move servicing of NFS callback to a threadpool 2021-03-29 09:20:33 -07:00
sqlite overlay: use PersistentSqliteStatement in TreeOverlayStore 2021-03-15 12:01:48 -07:00
store supress deprecated error for INSTANTIATE_TEST_CASE_P 2021-03-15 15:29:12 -07:00
takeover changing AsyncServerSocket::acceptError to receive exception_wrapper 2021-02-20 08:01:53 -08:00
telemetry log a structured event when a proxy hash lookup fails 2021-03-12 10:42:46 -08:00
testharness inodes: make InodeBase::setattr independant from FUSE 2021-03-05 11:11:19 -08:00
third-party fs: update fuse_kernel_linux.h 2021-03-17 20:55:43 -07:00
utils fix compilation error of missing type 2021-03-15 22:31:25 -07:00
CMakeLists.txt nfs: make it compile with getdeps builds 2021-02-03 17:54:54 -08:00