From c9bfb4b2f7c27d66db5a92ca93f0de469f60cf2f Mon Sep 17 00:00:00 2001 From: Xavier Deguillard Date: Mon, 22 Feb 2021 22:38:29 -0800 Subject: [PATCH] fs: use an nfs request timeout confir Summary: This is merely fixing a typo that I made previous where I reused the prjfs request timeout instead of adding a new one. Reviewed By: kmancini Differential Revision: D26500110 fbshipit-source-id: b9bf0cbc0d74866cdc2471f126751d6d8e514e21 --- eden/fs/config/EdenConfig.h | 10 ++++++++++ eden/fs/inodes/EdenMount.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/eden/fs/config/EdenConfig.h b/eden/fs/config/EdenConfig.h index ea26901698..ca1e95a890 100644 --- a/eden/fs/config/EdenConfig.h +++ b/eden/fs/config/EdenConfig.h @@ -330,6 +330,16 @@ class EdenConfig : private ConfigSettingManager { std::chrono::minutes(1), this}; + /** + * The maximum time duration allowed for a NFS request. If a request exceeds + * this amount of time, an NFS3ERR_JUKEBOX error will be returned to the + * client to avoid blocking forever. + */ + ConfigSetting nfsRequestTimeout{ + "nfs:request-timeout", + std::chrono::minutes(1), + this}; + /** * The maximum time duration allowed for a ProjectedFS callback. If a request * exceeds this amount of time, the request will fail to avoid blocking diff --git a/eden/fs/inodes/EdenMount.cpp b/eden/fs/inodes/EdenMount.cpp index b50cf77529..3a884857e0 100644 --- a/eden/fs/inodes/EdenMount.cpp +++ b/eden/fs/inodes/EdenMount.cpp @@ -1313,7 +1313,7 @@ folly::Future EdenMount::channelMount(bool readOnly) { std::chrono::duration_cast( serverState_->getReloadableConfig() .getEdenConfig() - ->prjfsRequestTimeout.getValue()), + ->nfsRequestTimeout.getValue()), serverState_->getNotifications(), config_->getCaseSensitive()); });