]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc: cache should ignore error bhs during trim 13245/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 17 Jan 2017 16:55:00 +0000 (11:55 -0500)
committerNathan Cutler <ncutler@suse.com>
Fri, 3 Feb 2017 12:15:10 +0000 (13:15 +0100)
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>
(cherry picked from commit 5910ed9de9856b5821488a1836487bbbd3d6460e)

src/osdc/ObjectCacher.cc

index e544a0ec5bbf128748cefb931a316428abb8a7d0..8f302784e53fa2f3c21655d958da0d4dcf07dcc3 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);