Whamcloud - gitweb
Introduce .gitignore files.
[fs/lustre-release.git] / lustre / mdt / mdt_reint.c
index 26f923d..0939947 100644 (file)
@@ -279,14 +279,14 @@ int mdt_attr_set(struct mdt_thread_info *info, struct mdt_object *mo, int flags)
         struct md_attr          *ma = &info->mti_attr;
         struct mdt_lock_handle  *lh;
         int som_update = 0;
-        int do_vbr = ma->ma_attr.la_valid & (LA_MODE|LA_UID|LA_GID);
+        int do_vbr = ma->ma_attr.la_valid & (LA_MODE|LA_UID|LA_GID|LA_FLAGS);
         int rc;
         ENTRY;
 
         /* attr shouldn't be set on remote object */
         LASSERT(mdt_object_exists(mo) >= 0);
 
-        if (info->mti_epoch)
+        if (exp_connect_som(info->mti_exp) && info->mti_epoch)
                 som_update = (info->mti_epoch->flags & MF_SOM_CHANGE);
 
         /* Try to avoid object_lock if another epoch has been started
@@ -813,14 +813,6 @@ static int mdt_rename_lock(struct mdt_thread_info *info,
         int rc;
         ENTRY;
 
-        /*
-         * Disable global rename BFL lock temporarily because
-         * when a mds do rename recoverying, which might enqueue
-         * BFL lock to the controller mds. and this req might be
-         * replay req for controller mds. but we did not have
-         * such handling in controller mds. XXX
-         */
-        RETURN(0);
         ms = mdt_md_site(info->mti_mdt);
         fid_build_reg_res_name(&LUSTRE_BFL_FID, res_id);
 
@@ -837,7 +829,6 @@ static int mdt_rename_lock(struct mdt_thread_info *info,
                 rc = ldlm_cli_enqueue_local(ns, res_id, LDLM_IBITS, policy,
                                             LCK_EX, &flags, ldlm_blocking_ast,
                                             ldlm_completion_ast, NULL, NULL, 0,
-                                            NULL,
                                             &info->mti_exp->exp_handle.h_cookie,
                                             lh);
         } else {
@@ -849,9 +840,8 @@ static int mdt_rename_lock(struct mdt_thread_info *info,
                  * This is the case mdt0 is remote node, issue DLM lock like
                  * other clients.
                  */
-                rc = ldlm_cli_enqueue(ms->ms_control_exp,
-                                      NULL, &einfo, res_id,
-                                      policy, &flags, NULL, 0, NULL, lh, 0);
+                rc = ldlm_cli_enqueue(ms->ms_control_exp, NULL, &einfo, res_id,
+                                      policy, &flags, NULL, 0, lh, 0);
         }
 
         RETURN(rc);
@@ -860,9 +850,6 @@ static int mdt_rename_lock(struct mdt_thread_info *info,
 static void mdt_rename_unlock(struct lustre_handle *lh)
 {
         ENTRY;
-        /* Disable global rename BFL lock temporarily. see above XXX*/
-        EXIT;
-        return;
         LASSERT(lustre_handle_is_used(lh));
         ldlm_lock_decref(lh, LCK_EX);
         EXIT;