From: Jason Dillaman Date: Mon, 15 Sep 2014 04:53:50 +0000 (-0400) Subject: rbd: ObjectCacher reads can hang when reading sparse files X-Git-Tag: v0.80.8~61 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=711a7e6f81983ff2091caa0f232af914a04a041c;p=ceph.git rbd: ObjectCacher reads can hang when reading sparse files The pending read list was not properly flushed when empty objects were read from a space file. Signed-off-by: Jason Dillaman (cherry picked from commit cdb7675a21c9107e3596c90c2b1598def3c6899f) --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index e804674ffe28..58fc6e5ca346 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -710,6 +710,9 @@ void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, ceph_tid_t tid, } } + ls.splice(ls.end(), waitfor_read); + waitfor_read.clear(); + // apply to bh's! loff_t opos = start; while (true) { @@ -764,9 +767,6 @@ void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, ceph_tid_t tid, loff_t oldpos = opos; opos = bh->end(); - ls.splice(ls.end(), waitfor_read); - waitfor_read.clear(); - if (r == -ENOENT) { if (trust_enoent) { ldout(cct, 10) << "bh_read_finish removing " << *bh << dendl;