From c5a9275c764b915567bb6c5ea13db77487aa49ee Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 28 Sep 2015 10:28:48 -0400 Subject: [PATCH] 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 --- src/osd/ReplicatedPG.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index d4e2b6dbe0d56..e77165682be1c 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)); -- 2.39.5