]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: preserve (some) flags when proxying reads 6096/head
authorSage Weil <sage@redhat.com>
Mon, 28 Sep 2015 14:28:48 +0000 (10:28 -0400)
committerSage Weil <sage@redhat.com>
Mon, 28 Sep 2015 14:28:48 +0000 (10:28 -0400)
In particular, proxy RWORDERED as clients in the real world set
that.

Fixes: #13260
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/ReplicatedPG.cc

index d4e2b6dbe0d56d1e0dba139b0dbdc0a765648e54..e77165682be1c6305b9b79850b2575770f57e4eb 100644 (file)
@@ -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));