* cloneid */
};
+enum {
+ CEPH_OSD_COPY_GET_FLAG_NOTSUPP_OMAP = 1, /* mean dest pool don't support omap*/
+};
+
enum {
CEPH_OSD_TMAP2OMAP_NULLOK = 1,
};
} __attribute__ ((packed)) clonerange;
struct {
__le64 max; /* max data in reply */
+ __le32 flags;
} __attribute__ ((packed)) copy_get;
struct {
__le64 snapid;
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();
// it already!
assert(cop->cursor.is_initial());
}
- op.copy_get(&cop->cursor, get_copy_chunk_size(),
+
+ uint32_t copyget_flags = 0;
+ if (pool.info.require_rollback())
+ copyget_flags |= CEPH_OSD_COPY_GET_FLAG_NOTSUPP_OMAP;
+
+ op.copy_get(&cop->cursor, get_copy_chunk_size(), copyget_flags,
&cop->results.object_size, &cop->results.mtime,
&cop->attrs, &cop->data, &cop->omap_header, &cop->omap_data,
&cop->results.snaps, &cop->results.snap_seq,
void copy_get(object_copy_cursor_t *cursor,
uint64_t max,
+ uint32_t copyget_flags,
uint64_t *out_size,
utime_t *out_mtime,
std::map<std::string,bufferlist> *out_attrs,
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;