From 7d48d7d0fbc77e871e3118a59b907f0cba23200e Mon Sep 17 00:00:00 2001 From: shadow Date: Tue, 7 Apr 2009 15:41:06 +0000 Subject: [PATCH] allow killing process which wait statahead result Branch HEAD b=18902 i=fanyong i=tappro --- lustre/ChangeLog | 7 +++++++ lustre/llite/statahead.c | 13 +++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 9112ec2..ad770af 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -13,6 +13,13 @@ tbd Sun Microsystems, Inc. removed cwd "./" (refer to Bugzilla 14399). * File join has been disabled in this release, refer to Bugzilla 16929. +Severity : normal +Frequency : rare +Bugzilla : 18902 +Descriptoin: allow kill process which wait statahead result +Details : for some reasons 'ls' can stick in waiting result from statahead, + in this case need way for kill this process. + Severity : enhancement Bugzilla : 18798 Description: Add state history info file, enhance import info file diff --git a/lustre/llite/statahead.c b/lustre/llite/statahead.c index e341675..c853210 100644 --- a/lustre/llite/statahead.c +++ b/lustre/llite/statahead.c @@ -1075,8 +1075,8 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, int lookup) struct ll_inode_info *lli = ll_i2info(dir); struct ll_statahead_info *sai = lli->lli_sai; struct ll_sa_thread_args sta; - struct l_wait_info lwi = { 0 }; - int rc; + struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL); + int rc = 0; ENTRY; LASSERT(lli->lli_opendir_pid == cfs_curproc_pid()); @@ -1120,9 +1120,10 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, int lookup) /* * thread started already, avoid double-stat. */ - l_wait_event(sai->sai_waitq, - ll_sai_entry_stated(sai) || sa_is_stopped(sai), - &lwi); + rc = l_wait_event(sai->sai_waitq, + ll_sai_entry_stated(sai) || + sa_is_stopped(sai), + &lwi); } if (lookup) { @@ -1141,7 +1142,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, int lookup) /* * do nothing for revalidate. */ - RETURN(0); + RETURN(rc); } /* -- 1.8.3.1