// 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,