From: Sage Weil Date: Mon, 28 Sep 2015 14:28:48 +0000 (-0400) Subject: osd/ReplicatedPG: preserve (some) flags when proxying reads X-Git-Tag: v9.1.0~38^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c5a9275c764b915567bb6c5ea13db77487aa49ee;p=ceph.git osd/ReplicatedPG: preserve (some) flags when proxying reads In particular, proxy RWORDERED as clients in the real world set that. Fixes: #13260 Signed-off-by: Sage Weil --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index d4e2b6dbe0d5..e77165682be1 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -2216,6 +2216,16 @@ void ReplicatedPG::do_proxy_read(OpRequestRef op) m->get_object_locator().get_pool(), m->get_object_locator().nspace); unsigned flags = CEPH_OSD_FLAG_IGNORE_CACHE | CEPH_OSD_FLAG_IGNORE_OVERLAY; + + // pass through some original flags that make sense. + // - leave out redirection and balancing flags since we are + // already proxying through the primary + // - leave off read/write/exec flags that are derived from the op + flags |= m->get_flags() & (CEPH_OSD_FLAG_RWORDERED | + CEPH_OSD_FLAG_ORDERSNAP | + CEPH_OSD_FLAG_ENFORCE_SNAPC | + CEPH_OSD_FLAG_MAP_SNAP_CLONE); + dout(10) << __func__ << " Start proxy read for " << *m << dendl; ProxyReadOpRef prdop(new ProxyReadOp(op, soid, m->ops));