* opened this file and is only replaying the RPC, so we open the
* inode by fid (at some large expense in security). */
if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) {
- DEBUG_REQ(D_HA, req, "open replay, disp: "LPX64"\n",
- rep->lock_policy_res1);
+ DEBUG_REQ(D_HA, req, "open replay");
+ CDEBUG(D_HA, "open fid "LPU64"/%u name %*s mode %o\n",
+ rec->ur_fid2->id, rec->ur_fid2->generation,
+ rec->ur_namelen - 1, rec->ur_name, rec->ur_mode);
LASSERT(rec->ur_fid2->id);
err);
}
} else if (created) {
+#if 0
mds_lock_new_child(obd, dchild->d_inode, NULL);
+#endif
}
l_dput(dchild);
case 1:
else
ptlrpc_save_lock (req, parent_lockh, parent_mode);
}
- if (rc == 0)
- atomic_inc(&mds->mds_open_count);
if (mea)
OBD_FREE(mea, mea_size);
RETURN(rc);
struct mds_body *request_body = NULL, *reply_body = NULL;
struct dentry_params dp;
struct iattr iattr = { 0 };
+ struct llog_create_locks *lcl = NULL;
ENTRY;
if (req && req->rq_reqmsg != NULL)
GOTO(cleanup, rc);
}
- if (req != NULL && req->rq_repmsg != NULL &&
- (reply_body->valid & OBD_MD_FLEASIZE) &&
- mds_log_op_unlink(obd, pending_child->d_inode, lmm,
- req->rq_repmsg->buflens[1],
- lustre_msg_buf(req->rq_repmsg, 2, 0),
- req->rq_repmsg->buflens[2]) > 0) {
- reply_body->valid |= OBD_MD_FLCOOKIE;
- }
-
pending_child->d_fsdata = (void *) &dp;
dp.p_inum = 0;
dp.p_ptr = req;
if (rc)
CERROR("error unlinking orphan %s: rc %d\n",fidname,rc);
+ if (req != NULL && req->rq_repmsg != NULL &&
+ (reply_body->valid & OBD_MD_FLEASIZE) &&
+ mds_log_op_unlink(obd, pending_child->d_inode,
+ lmm, req->rq_repmsg->buflens[1],
+ lustre_msg_buf(req->rq_repmsg, 2, 0),
+ req->rq_repmsg->buflens[2], &lcl) > 0) {
+ reply_body->valid |= OBD_MD_FLCOOKIE;
+ }
+
goto out; /* Don't bother updating attrs on unlinked inode */
}
mds_mfd_destroy(mfd);
cleanup:
- atomic_dec(&mds->mds_open_count);
if (req != NULL && reply_body != NULL) {
rc = mds_finish_transno(mds, pending_dir, handle, req, rc, 0);
} else if (handle) {
switch (cleanup_phase) {
case 2:
+ if (lcl != NULL)
+ ptlrpc_save_llog_lock(req, lcl);
dput(pending_child);
case 1:
up(&pending_dir->i_sem);
MDS_CHECK_RESENT(req, mds_reconstruct_generic(req));
}
+ if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) {
+ DEBUG_REQ(D_HA, req, "close replay\n");
+ memcpy(lustre_msg_buf(req->rq_repmsg, 2, 0),
+ lustre_msg_buf(req->rq_reqmsg, 1, 0),
+ req->rq_repmsg->buflens[2]);
+ }
+
body = lustre_swab_reqbuf(req, 0, sizeof(*body), lustre_swab_mds_body);
if (body == NULL) {
CERROR("Can't unpack body\n");