src_obj,
bucket_info, /* dest */
bucket_info, /* source */
- NULL, /* time_t *src_mtime, */
- NULL, /* time_t *mtime, */
- NULL, /* const time_t *mod_ptr, */
- NULL, /* const time_t *unmod_ptr, */
+ NULL, /* real_time* src_mtime, */
+ NULL, /* real_time* mtime, */
+ NULL, /* const real_time* mod_ptr, */
+ NULL, /* const real_time* unmod_ptr, */
NULL, /* const char *if_match, */
NULL, /* const char *if_nomatch, */
RGWRados::ATTRSMOD_NONE,
RGWStatObjCR::RGWStatObjCR(RGWAsyncRadosProcessor *async_rados, RGWRados *store,
const rgw_obj& obj, uint64_t *psize,
- ceph::real_time *pmtime, uint64_t *pepoch,
+ real_time* pmtime, uint64_t *pepoch,
RGWObjVersionTracker *objv_tracker)
: RGWSimpleCoroutine(store->ctx()), store(store), async_rados(async_rados),
obj(obj), psize(psize), pmtime(pmtime), pepoch(pepoch),
rgw_obj_key key;
uint64_t versioned_epoch;
- time_t src_mtime;
+ real_time src_mtime;
bool copy_if_newer;
rgw_obj_key key;
uint64_t versioned_epoch;
- time_t src_mtime;
+ real_time src_mtime;
bool copy_if_newer;
RGWRados *store;
rgw_obj obj;
uint64_t *psize;
- ceph::real_time *pmtime;
+ real_time *pmtime;
uint64_t *pepoch;
RGWObjVersionTracker *objv_tracker;
protected:
public:
RGWAsyncStatObj(RGWAioCompletionNotifier *cn, RGWRados *store,
const rgw_obj& obj, uint64_t *psize = nullptr,
- ceph::real_time *pmtime = nullptr, uint64_t *pepoch = nullptr,
+ real_time *pmtime = nullptr, uint64_t *pepoch = nullptr,
RGWObjVersionTracker *objv_tracker = nullptr)
- : RGWAsyncRadosRequest(cn), store(store), obj(obj), psize(psize),
- pmtime(pmtime), pepoch(pepoch), objv_tracker(objv_tracker) {}
+ : RGWAsyncRadosRequest(cn), store(store), obj(obj), psize(psize),
+ pmtime(pmtime), pepoch(pepoch), objv_tracker(objv_tracker) {}
};
class RGWStatObjCR : public RGWSimpleCoroutine {
RGWAsyncRadosProcessor *async_rados;
rgw_obj obj;
uint64_t *psize;
- ceph::real_time *pmtime;
+ real_time *pmtime;
uint64_t *pepoch;
RGWObjVersionTracker *objv_tracker;
RGWAsyncStatObj *req = nullptr;
public:
RGWStatObjCR(RGWAsyncRadosProcessor *async_rados, RGWRados *store,
- const rgw_obj& obj, uint64_t *psize = nullptr,
- ceph::real_time *pmtime = nullptr, uint64_t *pepoch = nullptr,
- RGWObjVersionTracker *objv_tracker = nullptr);
+ const rgw_obj& obj, uint64_t *psize = nullptr,
+ real_time* pmtime = nullptr, uint64_t *pepoch = nullptr,
+ RGWObjVersionTracker *objv_tracker = nullptr);
~RGWStatObjCR();
int send_request() override;
uint64_t chunk_size = COPY_BUF_SIZE;
uint64_t ofs = 0;
int ret = 0;
+ real_time mtime;
struct timespec mtime_ts;
uint64_t size;
if (ofs == 0) {
rop.stat2(&size, &mtime_ts, NULL);
+ mtime = real_clock::from_timespec(mtime_ts);
}
rop.read(ofs, chunk_size, &data, NULL);
ret = src_ioctx.operate(src_oid, &rop, NULL);
if (ofs == 0) {
wop.create(true); /* make it exclusive */
wop.mtime2(&mtime_ts);
+ mtime = real_clock::from_timespec(mtime_ts);
}
wop.write(ofs, data);
ret = dst_ioctx.operate(dst_oid, &wop);
if (state->is_olh) {
op.setxattr(RGW_ATTR_OLH_ID_TAG, state->olh_tag);
}
- struct timespec mtime_ts = ceph::real_clock::to_timespec(meta.set_mtime);
+
+ struct timespec mtime_ts = real_clock::to_timespec(meta.set_mtime);
op.mtime2(&mtime_ts);
if (meta.data) {
set_mtime = real_clock::now();
}
- struct timespec mtime_ts = ceph::real_clock::to_timespec(set_mtime);
-
+ struct timespec mtime_ts = real_clock::to_timespec(set_mtime);
op.mtime2(&mtime_ts);
op.write_full(data);
state.io_ctx.locator_set_key(loc);
r = state.io_ctx.aio_operate(oid, state.completion, &op, NULL);
if (r < 0) {
- ldout(store->ctx(), 5) << __func__ << ": ERROR: aio_operate() returned ret=" << r << dendl;
+ ldout(store->ctx(), 5) << __func__
+ << ": ERROR: aio_operate() returned ret=" << r
+ << dendl;
return r;
}
return;
}
http_ret = meta_log.lock_exclusive(shard_id, timespan(dur), zone_id,
- locker_id);
+ locker_id);
if (http_ret == -EBUSY)
http_ret = -ERR_LOCKED;
}