From dea226f8926791c1610b425f22d467ed70004090 Mon Sep 17 00:00:00 2001 From: shadow Date: Tue, 31 Mar 2009 05:47:07 +0000 Subject: [PATCH] allow kill process which stick in waiting statahead result. Branch b_release_1_8_0 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 fd45775..06d058a 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -44,6 +44,13 @@ information, please refer to bugzilla 17630. 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 : normal Frequency : rare, at shutdown Bugzilla : 18773 Descriptoin: panic at umount diff --git a/lustre/llite/statahead.c b/lustre/llite/statahead.c index 2ecdc67..9dd17af 100644 --- a/lustre/llite/statahead.c +++ b/lustre/llite/statahead.c @@ -1019,8 +1019,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()); @@ -1064,9 +1064,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) { @@ -1085,7 +1086,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