From 5b2b1d14468c290c56ee6c95ea557c99464e0098 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 28 Nov 2017 15:01:32 -0800 Subject: client: quit on failed remount during dentry invalidate test Fixes: http://tracker.ceph.com/issues/22269 Signed-off-by: Patrick Donnelly --- src/ceph_fuse.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ceph_fuse.cc') diff --git a/src/ceph_fuse.cc b/src/ceph_fuse.cc index d536365c3fb..76fedf50afe 100644 --- a/src/ceph_fuse.cc +++ b/src/ceph_fuse.cc @@ -161,12 +161,14 @@ int main(int argc, const char **argv, const char *envp[]) { #if defined(__linux__) int ver = get_linux_version(); assert(ver != 0); - auto client_try_dentry_invalidate = g_conf->get_val( + bool client_try_dentry_invalidate = g_conf->get_val( "client_try_dentry_invalidate"); bool can_invalidate_dentries = client_try_dentry_invalidate && ver < KERNEL_VERSION(3, 18, 0); int tr = client->test_dentry_handling(can_invalidate_dentries); - if (tr != 0) { + bool client_die_on_failed_dentry_invalidate = g_conf->get_val( + "client_die_on_failed_dentry_invalidate"); + if (tr != 0 && client_die_on_failed_dentry_invalidate) { cerr << "ceph-fuse[" << getpid() << "]: fuse failed dentry invalidate/remount test with error " << cpp_strerror(tr) << ", stopping" << std::endl; -- cgit v1.2.3