From cebba011e502f7009208bbddc295eb17f88f1bb9 Mon Sep 17 00:00:00 2001 From: Dan van der Ster Date: Fri, 9 Dec 2016 22:06:26 +0100 Subject: [PATCH] os/filestore/HashIndex: be loud about splits Filestore splits are a rare yet important enough event that an OSD should visibly report when they happen. Without this reporting an operator could spend hours trying to understand the cause of any split-induced slow requests. Fixes: http://tracker.ceph.com/issues/18235 Signed-off-by: Dan van der Ster (cherry picked from commit 61c47acd3a1f3e01f0106d4a541bb7f28a1301d8) --- src/os/filestore/HashIndex.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/os/filestore/HashIndex.cc b/src/os/filestore/HashIndex.cc index 1839a04883613..fa5622c313913 100644 --- a/src/os/filestore/HashIndex.cc +++ b/src/os/filestore/HashIndex.cc @@ -315,6 +315,8 @@ int HashIndex::split_dirs(const vector &path) { } if (must_split(info)) { + dout(1) << __func__ << " " << path << " has " << info.objs + << " objects, starting split." << dendl; r = initiate_split(path, info); if (r < 0) { dout(10) << "error initiating split on " << path << ": " @@ -323,6 +325,8 @@ int HashIndex::split_dirs(const vector &path) { } r = complete_split(path, info); + dout(1) << __func__ << " " << path << " split completed." + << dendl; if (r < 0) { dout(10) << "error completing split on " << path << ": " << cpp_strerror(r) << dendl; @@ -378,10 +382,15 @@ int HashIndex::_created(const vector &path, return r; if (must_split(info)) { + dout(1) << __func__ << " " << path << " has " << info.objs + << " objects, starting split." << dendl; int r = initiate_split(path, info); if (r < 0) return r; - return complete_split(path, info); + r = complete_split(path, info); + dout(1) << __func__ << " " << path << " split completed." + << dendl; + return r; } else { return 0; } -- 2.39.5