From: Jason Dillaman Date: Tue, 17 Jan 2017 16:55:00 +0000 (-0500) Subject: osdc: cache should ignore error bhs during trim X-Git-Tag: v11.2.1~195^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d96ae9ead2d2f58180e533a63c640098d5134047;p=ceph.git 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) --- 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);