From 698e1de5585928679bca60a5dc2734e9638034df Mon Sep 17 00:00:00 2001 From: wangdi Date: Thu, 21 Sep 2006 14:55:20 +0000 Subject: [PATCH] Branch: b_new_cmd 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 | 4 ++++ lustre/llite/file.c | 2 +- lustre/lmv/lmv_intent.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 01af337..b45dd59 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -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); diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 2cbe707..5c3706e 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -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; diff --git a/lustre/lmv/lmv_intent.c b/lustre/lmv/lmv_intent.c index dad8e78..e8f5219 100644 --- a/lustre/lmv/lmv_intent.c +++ b/lustre/lmv/lmv_intent.c @@ -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); } } -- 1.8.3.1