Whamcloud - gitweb
Branch: b_new_cmd
authorwangdi <wangdi>
Thu, 21 Sep 2006 14:55:20 +0000 (14:55 +0000)
committerwangdi <wangdi>
Thu, 21 Sep 2006 14:55:20 +0000 (14:55 +0000)
1) revert back the last commit for cancel the update lock of cross-ref object,
   since the following revalidate may need this lock.
2) set l_ast_data for the update lock in readdir, since it may not be set for the
   for the cross-object.
3) in ll_revalidate_inode_it, we should only try to get GETATTR lock.

lustre/llite/dir.c
lustre/llite/file.c
lustre/lmv/lmv_intent.c

index 01af337..b45dd59 100644 (file)
@@ -308,6 +308,10 @@ static struct page *ll_get_dir_page(struct inode *dir, __u32 hash, int exact,
                         CERROR("lock enqueue: rc: %d\n", rc);
                         return ERR_PTR(rc);
                 }
+        } else {
+                /* for cross-ref object, l_ast_data of the lock may not be set,
+                 * we reset it here */
+                md_set_lock_data(ll_i2sbi(dir)->ll_md_exp, (__u64*)&lockh, dir);
         }
         ldlm_lock_dump_handle(D_OTHER, &lockh);
 
index 2cbe707..5c3706e 100644 (file)
@@ -2433,7 +2433,7 @@ int ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it)
 
                 ll_lookup_finish_locks(&oit, dentry);
         } else if (!ll_have_md_lock(dentry->d_inode,
-                                    MDS_INODELOCK_UPDATE|MDS_INODELOCK_LOOKUP)) {
+                                    MDS_INODELOCK_UPDATE)) {
                 struct ll_sb_info *sbi = ll_i2sbi(dentry->d_inode);
                 obd_valid valid = OBD_MD_FLGETATTR;
                 int ealen = 0;
index dad8e78..e8f5219 100644 (file)
@@ -48,7 +48,7 @@
 static inline void lmv_drop_intent_lock(struct lookup_intent *it)
 {
         if (it->d.lustre.it_lock_mode != 0) {
-                ldlm_lock_decref_and_cancel((void *)&it->d.lustre.it_lock_handle,
+                ldlm_lock_decref((void *)&it->d.lustre.it_lock_handle,
                                  it->d.lustre.it_lock_mode);
         }
 }