]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osdc: cache should ignore error bhs during trim
authorJason Dillaman <dillaman@redhat.com>
Tue, 17 Jan 2017 16:55:00 +0000 (11:55 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 17 Jan 2017 16:55:00 +0000 (11:55 -0500)
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 <dillaman@redhat.com>
src/osdc/ObjectCacher.cc

index 156524142dc2391eedf3fd06e73e0b0fafb7e429..6d8f018d6bdfac9b4151089c1ed24d66be6cb4f2 100644 (file)
@@ -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);