]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: send -EAGAIN for both balanced and localized reads
authorJosh Durgin <josh.durgin@inktank.com>
Sun, 12 May 2013 21:47:20 +0000 (14:47 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 13 May 2013 02:31:22 +0000 (19:31 -0700)
This logic for localized reads applies to balanced reads too.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/osd/ReplicatedPG.cc

index bbb67213e9c2c7b091af71723466d17ec54e6d06..c6babe04c6f38dbb2e6d85f482d88d9ffacb2ac1 100644 (file)
@@ -697,7 +697,9 @@ void ReplicatedPG::do_op(OpRequestRef op)
       // If we're not the primary of this OSD, and we have
       // CEPH_OSD_FLAG_LOCALIZE_READS set, we just return -EAGAIN. Otherwise,
       // we have to wait for the object.
-      if (is_primary() || (!(m->get_flags() & CEPH_OSD_FLAG_LOCALIZE_READS))) {
+      if (is_primary() ||
+         (!(m->get_flags() & CEPH_OSD_FLAG_BALANCE_READS) &&
+          !(m->get_flags() & CEPH_OSD_FLAG_LOCALIZE_READS))) {
        // missing the specific snap we need; requeue and wait.
        assert(!can_create); // only happens on a read
        hobject_t soid(m->get_oid(), m->get_object_locator().key,