]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "rados: Add new field flags for ceph_osd_op.copy_get." 8486/head
authorSage Weil <sage@redhat.com>
Thu, 7 Apr 2016 15:13:03 +0000 (11:13 -0400)
committerSage Weil <sage@redhat.com>
Thu, 7 Apr 2016 15:13:03 +0000 (11:13 -0400)
This reverts commit 2b4acfb1b808b98132a771cf1089063c0f7a75b5.

We fixed this on the receiving end in
fc51ce2a837e8e878d46d8ca54531aa7bd5d01b2 a few weeks after this commit
was added.  It's ugly and no longer needed.

This *does* mean that we'll start to copy some data and then abort
partway through, but that's better than an kludgey protocol/interface.

Signed-off-by: Sage Weil <sage@redhat.com>
src/include/rados.h
src/osd/ReplicatedPG.cc
src/osdc/Objecter.h

index f14d6777cf5b025556b4d33d3c60935c168c751e..c58277fdc6c08eb8648bf688d3173f64e6939ca6 100644 (file)
@@ -445,10 +445,6 @@ enum {
        CEPH_OSD_COPY_FROM_FLAG_RWORDERED = 16, /* order with write */
 };
 
-enum {
-       CEPH_OSD_COPY_GET_FLAG_NOTSUPP_OMAP = 1, /* mean dest pool don't support omap*/
-};
-
 enum {
        CEPH_OSD_TMAP2OMAP_NULLOK = 1,
 };
@@ -516,7 +512,6 @@ struct ceph_osd_op {
                } __attribute__ ((packed)) clonerange;
                struct {
                        __le64 max;     /* max data in reply */
-                       __le32 flags;
                } __attribute__ ((packed)) copy_get;
                struct {
                        __le64 snapid;
index 3958f8942ea579e02a9fd291e387325e16cf6bb6..764b4a610e6cf25bab5a34c5c7ddff9afffd683b 100644 (file)
@@ -6919,10 +6919,6 @@ int ReplicatedPG::fill_in_copy_get(
     return result;
   }
 
-  if ((osd_op.op.copy_get.flags & CEPH_OSD_COPY_GET_FLAG_NOTSUPP_OMAP) &&
-      oi.is_omap())
-      return -EOPNOTSUPP;
-
   MOSDOp *op = reinterpret_cast<MOSDOp*>(ctx->op->get_req());
   uint64_t features = op->get_features();
 
@@ -7162,12 +7158,7 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop)
     // it already!
     assert(cop->cursor.is_initial());
   }
-
-  uint32_t copyget_flags = 0;
-  if (!pool.info.supports_omap())
-   copyget_flags |= CEPH_OSD_COPY_GET_FLAG_NOTSUPP_OMAP;
-
-  op.copy_get(&cop->cursor, get_copy_chunk_size(), copyget_flags,
+  op.copy_get(&cop->cursor, get_copy_chunk_size(),
              &cop->results.object_size, &cop->results.mtime,
              &cop->attrs, &cop->data, &cop->omap_header, &cop->omap_data,
              &cop->results.snaps, &cop->results.snap_seq,
index 05b29bbb91ffab09b7d897744aab3016cc57e342..3f5d8537f6e5d79b8d87a3c439290d02ab1c92fd 100644 (file)
@@ -747,7 +747,6 @@ struct ObjectOperation {
 
   void copy_get(object_copy_cursor_t *cursor,
                uint64_t max,
-               uint32_t copyget_flags,
                uint64_t *out_size,
                ceph::real_time *out_mtime,
                std::map<std::string,bufferlist> *out_attrs,
@@ -765,7 +764,6 @@ struct ObjectOperation {
                int *prval) {
     OSDOp& osd_op = add_op(CEPH_OSD_OP_COPY_GET);
     osd_op.op.copy_get.max = max;
-    osd_op.op.copy_get.flags = copyget_flags;
     ::encode(*cursor, osd_op.indata);
     ::encode(max, osd_op.indata);
     unsigned p = ops.size() - 1;