Use FUSE_CACHE_SYMLINKS option

Summary: This option was added upstream and to our internal 4.16 kernel series

Reviewed By: chadaustin

Differential Revision: D12823476

fbshipit-source-id: 54d241b77eff92f4083c0f1d4c98b47a6a098e3f
This commit is contained in:
Dan Schatzberg 2018-10-29 11:13:22 -07:00 committed by Facebook Github Bot
parent c014c027f6
commit 4efb8d24a5

View File

@ -259,6 +259,7 @@ static const std::unordered_map<int32_t, const char*> capsLabels = {
{FUSE_PARALLEL_DIROPS, "PARALLEL_DIROPS"},
{FUSE_HANDLE_KILLPRIV, "HANDLE_KILLPRIV"},
{FUSE_POSIX_ACL, "POSIX_ACL"},
{FUSE_CACHE_SYMLINKS, "CACHE_SYMLINKS"},
#ifdef __APPLE__
{FUSE_ALLOCATE, "ALLOCATE"},
{FUSE_EXCHANGE_DATA, "EXCHANGE_DATA"},
@ -964,7 +965,7 @@ void FuseChannel::readInitPacket() {
// seems to trigger a kernel/FUSE bug. See
// test_mmap_is_null_terminated_after_truncate_and_write_to_overlay
// in mmap_test.py. FUSE_ATOMIC_O_TRUNC |
want = capable & (FUSE_BIG_WRITES | FUSE_ASYNC_READ);
want = capable & (FUSE_BIG_WRITES | FUSE_ASYNC_READ | FUSE_CACHE_SYMLINKS);
XLOG(INFO) << "Speaking fuse protocol kernel=" << init.init.major << "."
<< init.init.minor << " local=" << FUSE_KERNEL_VERSION << "."