From d96ae9ead2d2f58180e533a63c640098d5134047 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Tue, 17 Jan 2017 11:55:00 -0500 Subject: [PATCH] osdc: cache should ignore error bhs during trim A read error (such as injecting a timeout into an OSD op) might result in a bh in an error state. These should be trimable by the cache. Fixes: http://tracker.ceph.com/issues/18436 Signed-off-by: Jason Dillaman (cherry picked from commit 5910ed9de9856b5821488a1836487bbbd3d6460e) --- src/osdc/ObjectCacher.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index e544a0ec5bbf1..8f302784e53fa 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -1234,7 +1234,7 @@ void ObjectCacher::trim() break; ldout(cct, 10) << "trim trimming " << *bh << dendl; - assert(bh->is_clean() || bh->is_zero()); + assert(bh->is_clean() || bh->is_zero() || bh->is_error()); Object *ob = bh->ob; bh_remove(ob, bh); -- 2.39.5