Whamcloud - gitweb
- mds_lock_mode_for_dir() should check also MDS_NO_SPLIT_EXPECTED.
authoryury <yury>
Fri, 13 Aug 2004 16:07:36 +0000 (16:07 +0000)
committeryury <yury>
Fri, 13 Aug 2004 16:07:36 +0000 (16:07 +0000)
- mds_reint_link() should use LCK_PW instead of LCK_EX when calling mds_lock_mode_for_dir().

lustre/mds/handler.c
lustre/mds/mds_reint.c

index 9b55c52..735489c 100644 (file)
@@ -180,7 +180,7 @@ int mds_lock_mode_for_dir(struct obd_device *obd,
          *    type of access (lookup/modify/split) - LCK_EX -bzzz */
 
         split = mds_splitting_expected(obd, dentry);
-        if (split == MDS_NO_SPLITTABLE) {
+        if (split == MDS_NO_SPLITTABLE || MDS_NO_SPLIT_EXPECTED) {
                 /* this inode won't be splitted. so we need not to protect from
                  * just flush client's cache on modification */
                 ret_mode = 0;
index 1b88793..cb7524f 100644 (file)
@@ -2153,7 +2153,7 @@ static int mds_reint_link(struct mds_update_record *rec, int offset,
 #ifdef S_PDIROPS
         if (IS_PDIROPS(de_tgt_dir->d_inode)) {
                 int flags = 0;
-                update_mode = mds_lock_mode_for_dir(obd, de_tgt_dir, LCK_EX);
+                update_mode = mds_lock_mode_for_dir(obd, de_tgt_dir, LCK_PW);
                 if (update_mode) {
                         rc = ldlm_cli_enqueue(NULL, NULL, obd->obd_namespace,
                                               tgt_dir_res_id, LDLM_IBITS,