if (rc)
return rc;
- if (mti->mti_mos != NULL)
+ /* we probably should not set local transno to the remote object
+ * on another storage, What about VBR on remote object? XXX */
+ if (mti->mti_mos != NULL && !mdt_object_remote(mti->mti_mos))
rc = dt_declare_version_set(env, mdt_obj2dt(mti->mti_mos), th);
return rc;
LASSERT(req != NULL && req->rq_repmsg != NULL);
/** VBR: set new versions */
- if (txn->th_result == 0 && mti->mti_mos != NULL) {
+ /* we probably should not set local transno to the remote object
+ * on another storage, What about VBR on remote object? XXX */
+ if (txn->th_result == 0 && mti->mti_mos != NULL &&
+ !mdt_object_remote(mti->mti_mos)) {
+
dt_version_set(env, mdt_obj2dt(mti->mti_mos),
mti->mti_transno, txn);
mti->mti_mos = NULL;
mti->mti_attr.ma_need = MA_INODE;
mti->mti_attr.ma_valid = 0;
rc = mdt_attr_get_complex(mti, child, &mti->mti_attr);
- if (rc == -EREMOTE) {
- /* object was created on remote server */
- req->rq_status = rc;
- body->valid |= OBD_MD_MDS;
- }
- mdt_pack_attr2body(mti, body, &mti->mti_attr.ma_attr,
- mdt_object_fid(child));
- mdt_object_put(mti->mti_env, child);
+ if (rc == -EREMOTE) {
+ /* object was created on remote server */
+ if (!mdt_is_dne_client(exp))
+ /* Return -EIO for old client */
+ rc = -EIO;
+
+ req->rq_status = rc;
+ body->valid |= OBD_MD_MDS;
+ }
+ mdt_pack_attr2body(mti, body, &mti->mti_attr.ma_attr,
+ mdt_object_fid(child));
+ mdt_object_put(mti->mti_env, child);
}
static void mdt_reconstruct_setattr(struct mdt_thread_info *mti,