From d6c8aec4c53d99599c6d5aee72d3b22696679e1d Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Thu, 8 Nov 2018 18:28:37 +0530 Subject: [PATCH] mds: disallow dumping huge caches to formatter Dumping huge caches (~ 1G) to formatter causes mds to hang or get terminated. Until the underlying issues is fixed, disallow dumping cache if cache usage exceeds this threshold. Also, Patrick feels a similar issue might be hiding there for cache dumps to file when cache sizes are really huge. This case has not been been reproduced yet, hence, the limit for cache dumps to file is currently kept not capped. Fixes: http://tracker.ceph.com/issues/37609 Signed-off-by: Venky Shankar (cherry picked from commit 6be2ce98c629d2cfe9d8443659e59600148b7675) Conflicts: src/common/options.cc src/mds/MDCache.cc Minor fix for fetching config option with g_conf. --- src/common/options.cc | 10 ++++++++++ src/mds/MDCache.cc | 26 ++++++++++++++++++++++++++ src/mds/MDSDaemon.cc | 2 ++ 3 files changed, 38 insertions(+) diff --git a/src/common/options.cc b/src/common/options.cc index 5d1c969462617..60b2ffe81377d 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -7093,6 +7093,16 @@ std::vector