From 6dd42392c0f00011059ffa5de74cace7d1e911bd Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 5 Jan 2018 08:35:34 -0600 Subject: [PATCH] osd: allow limited scrub preemption If we receive a write within the scrub range, abort the scrub chunk and shrink the chunk size. If we do this too many times do not preempt and allow the scrub to complete (to avoid scrub starvation due to client io). Signed-off-by: Sage Weil --- src/common/options.cc | 4 ++ src/messages/MOSDRepScrub.h | 23 ++++++---- src/messages/MOSDRepScrubMap.h | 10 ++++- src/osd/ECBackend.cc | 1 + src/osd/PG.cc | 76 ++++++++++++++++++++++++++++++---- src/osd/PG.h | 18 ++++---- src/osd/PGBackend.h | 1 + src/osd/PrimaryLogPG.cc | 18 ++++---- src/osd/PrimaryLogPG.h | 5 ++- src/osd/ReplicatedBackend.cc | 2 + 10 files changed, 125 insertions(+), 33 deletions(-) diff --git a/src/common/options.cc b/src/common/options.cc index 7f9222d35e707..fac7b6c52fde2 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -2681,6 +2681,10 @@ std::vector