Project

General

Profile

copy-from.patch

Luis Henriques, 11/29/2018 02:15 PM

Download (1.28 KB)

View differences:

src/include/rados.h
498 498
	CEPH_OSD_COPY_FROM_FLAG_MAP_SNAP_CLONE = 8, /* map snap direct to
499 499
						     * cloneid */
500 500
	CEPH_OSD_COPY_FROM_FLAG_RWORDERED = 16, /* order with write */
501
	CEPH_OSD_COPY_FROM_FLAG_IGNORE_TRUNCATE_SEQ = 32, /* don't copy
502
							   * truncate_seq */
501 503
};
502 504

  
503 505
enum {
src/osd/PrimaryLogPG.cc
9478 9478
    obs.oi.clear_omap_digest();
9479 9479
  }
9480 9480

  
9481
  obs.oi.truncate_seq = cb->results->truncate_seq;
9482
  obs.oi.truncate_size = cb->results->truncate_size;
9481
  unsigned flags = 0;
9482
  map<hobject_t,CopyOpRef>::iterator p = copy_ops.find(obs.oi.soid);
9483
  if (p != copy_ops.end()) {
9484
    CopyOpRef cop = p->second;
9485
    flags = cop->flags;
9486
  }
9487
  if (!(flags & CEPH_OSD_COPY_FROM_FLAG_IGNORE_TRUNCATE_SEQ)) {
9488
    obs.oi.truncate_seq = cb->results->truncate_seq;
9489
    obs.oi.truncate_size = cb->results->truncate_size;
9490
  }
9483 9491

  
9484 9492
  ctx->extra_reqids = cb->results->reqids;
9485 9493
  ctx->extra_reqid_return_codes = cb->results->reqid_return_codes;