Whamcloud - gitweb
LU-12037 mdt: add option for cross-MDT rename
[fs/lustre-release.git] / lustre / mdt / mdt_handler.c
index 923e42a..2ce7a68 100644 (file)
@@ -3702,7 +3702,10 @@ static int mdt_intent_getxattr(enum ldlm_intent_flags it_opc,
        if (ldlm_rep == NULL ||
            OBD_FAIL_CHECK(OBD_FAIL_MDS_XATTR_REP)) {
                mdt_object_unlock(info,  info->mti_object, lhc, 1);
-               RETURN(err_serious(-EFAULT));
+               if (is_serious(rc))
+                       RETURN(rc);
+               else
+                       RETURN(err_serious(-EFAULT));
        }
 
        ldlm_rep->lock_policy_res2 = clear_serious(rc);
@@ -3965,11 +3968,15 @@ static int mdt_intent_open(enum ldlm_intent_flags it_opc,
 
         rc = mdt_reint_internal(info, lhc, opc);
 
-        /* Check whether the reply has been packed successfully. */
-        if (mdt_info_req(info)->rq_repmsg != NULL)
-                rep = req_capsule_server_get(info->mti_pill, &RMF_DLM_REP);
-        if (rep == NULL)
-                RETURN(err_serious(-EFAULT));
+       /* Check whether the reply has been packed successfully. */
+       if (mdt_info_req(info)->rq_repmsg != NULL)
+               rep = req_capsule_server_get(info->mti_pill, &RMF_DLM_REP);
+       if (rep == NULL) {
+               if (is_serious(rc))
+                       RETURN(rc);
+               else
+                       RETURN(err_serious(-EFAULT));
+       }
 
         /* MDC expects this in any case */
         if (rc != 0)
@@ -5137,6 +5144,7 @@ static int mdt_init0(const struct lu_env *env, struct mdt_device *m,
        m->mdt_enable_striped_dir = 1;
        m->mdt_enable_dir_migration = 1;
        m->mdt_enable_remote_dir_gid = 0;
+       m->mdt_enable_remote_rename = 1;
 
        atomic_set(&m->mdt_mds_mds_conns, 0);
        atomic_set(&m->mdt_async_commit_count, 0);