return;
}
mdr = mdcache->request_start_slave(m->get_reqid(), m->get_attempt(), m);
+ mdr->set_op_stamp(m->op_stamp);
}
assert(mdr->slave_request == 0); // only one at a time, please!
in->inode.uid = mdr->client_request->get_caller_uid();
- in->inode.ctime = in->inode.mtime = in->inode.atime = mdr->now; // now
+ in->inode.ctime = in->inode.mtime = in->inode.atime = mdr->get_op_stamp();
MClientRequest *req = mdr->client_request;
if (req->get_data().length()) {
// project inode update
inode_t *pi = targeti->project_inode();
pi->nlink++;
- pi->ctime = mdr->now;
+ pi->ctime = mdr->get_op_stamp();
pi->version = tipv;
snapid_t follows = dn->get_dir()->inode->find_snaprealm()->get_newest_seq();
op = MMDSSlaveRequest::OP_UNLINKPREP;
MMDSSlaveRequest *req = new MMDSSlaveRequest(mdr->reqid, mdr->attempt, op);
targeti->set_object_info(req->get_object_info());
- req->now = mdr->now;
+ req->op_stamp = mdr->get_op_stamp();
mds->send_message_mds(req, linkauth);
assert(mdr->more()->waiting_on_slave.count(linkauth) == 0);
CDentry::linkage_t *dnl = dn->get_linkage();
assert(dnl->is_primary());
+ mdr->set_op_stamp(mdr->slave_request->op_stamp);
mdr->now = mdr->slave_request->now;
mdr->auth_pin(targeti);
::encode(rollback, le->rollback);
mdr->more()->rollback_bl = le->rollback;
- pi->ctime = mdr->now;
+ pi->ctime = mdr->get_op_stamp();
pi->version = targeti->pre_dirty();
dout(10) << " projected inode " << pi << " v " << pi->version << dendl;
inode_t *pi = in->project_inode();
mdr->add_projected_inode(in); // do this _after_ my dn->pre_dirty().. we apply that one manually.
pi->version = in->pre_dirty();
- pi->ctime = mdr->now;
+ pi->ctime = mdr->get_op_stamp();
pi->nlink--;
if (pi->nlink == 0)
in->state_set(CInode::STATE_ORPHAN);
MMDSSlaveRequest::OP_RMDIRPREP);
dn->make_path(req->srcdnpath);
straydn->make_path(req->destdnpath);
- req->now = mdr->now;
+ req->op_stamp = mdr->get_op_stamp();
mdcache->replicate_stray(straydn, who, req->stray);
CDentry *straydn = mdr->straydn;
dout(10) << " straydn " << *straydn << dendl;
- mdr->now = mdr->slave_request->now;
+ mdr->set_op_stamp(mdr->slave_request->op_stamp);
rmdir_rollback rollback;
rollback.reqid = mdr->reqid;
MMDSSlaveRequest::OP_RENAMEPREP);
srcdn->make_path(req->srcdnpath);
destdn->make_path(req->destdnpath);
- req->now = mdr->now;
+ req->op_stamp = mdr->get_op_stamp();
if (straydn)
mdcache->replicate_stray(straydn, who, req->stray);
if (!silent) {
if (pi) {
- pi->ctime = mdr->now;
+ pi->ctime = mdr->get_op_stamp();
if (linkmerge)
pi->nlink--;
}
if (tpi) {
- tpi->ctime = mdr->now;
+ tpi->ctime = mdr->get_op_stamp();
tpi->nlink--;
if (tpi->nlink == 0)
oldin->state_set(CInode::STATE_ORPHAN);
if (destdnl->is_primary() && !linkmerge)
assert(straydn);
- mdr->now = mdr->slave_request->now;
+ mdr->set_op_stamp(mdr->slave_request->op_stamp);
mdr->more()->srcdn_auth_mds = srcdn->authority().first;
// set up commit waiter (early, to clean up any freezing etc we do)
info.ino = diri->ino();
info.snapid = snapid;
info.name = snapname;
- info.stamp = mdr->now;
+ info.stamp = mdr->get_op_stamp();
inode_t *pi = diri->project_inode();
pi->ctime = info.stamp;
bufferlist inode_export;
version_t inode_export_v;
bufferlist srci_replica;
- utime_t now;
+ utime_t op_stamp;
bufferlist stray; // stray dir + dentry
::encode(srcdnpath, payload);
::encode(destdnpath, payload);
::encode(witnesses, payload);
- ::encode(now, payload);
+ ::encode(op_stamp, payload);
::encode(inode_export, payload);
::encode(inode_export_v, payload);
::encode(srci_replica, payload);
::decode(srcdnpath, p);
::decode(destdnpath, p);
::decode(witnesses, p);
- ::decode(now, p);
+ ::decode(op_stamp, p);
::decode(inode_export, p);
::decode(inode_export_v, p);
::decode(srci_replica, p);