]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: ObjectCacher reads can hang when reading sparse files
authorJason Dillaman <dillaman@redhat.com>
Mon, 15 Sep 2014 04:53:50 +0000 (00:53 -0400)
committerSage Weil <sage@redhat.com>
Fri, 3 Oct 2014 00:50:39 +0000 (17:50 -0700)
The pending read list was not properly flushed when empty objects
were read from a space file.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit cdb7675a21c9107e3596c90c2b1598def3c6899f)

src/osdc/ObjectCacher.cc

index e804674ffe28572db0164fd9c01d2cdb800a9fff..58fc6e5ca3466e8e07c38ca38f2ecfc2b4ed21a4 100644 (file)
@@ -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;