From: Josh Durgin Date: Sun, 12 May 2013 21:47:20 +0000 (-0700) Subject: ReplicatedPG: send -EAGAIN for both balanced and localized reads X-Git-Tag: v0.63~38^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0c7414b1de75e62db04b40797036e16ab64487e8;p=ceph.git ReplicatedPG: send -EAGAIN for both balanced and localized reads This logic for localized reads applies to balanced reads too. Signed-off-by: Josh Durgin --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index bbb67213e9c2..c6babe04c6f3 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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,