From mboxrd@z Thu Jan 1 00:00:00 1970 From: "William H. Taber" Subject: Re: [autofs] [RFC PATCH]autofs4: hang and proposed fix Date: Fri, 18 Nov 2005 15:08:57 -0500 Message-ID: <437E34D9.4050102@us.ibm.com> References: <20051116101740.GA9551@RAM> <1132159817.5720.33.camel@localhost> <1132192362.5720.163.camel@localhost> <437CD7D2.40003@us.ibm.com> <437DF12A.5050805@us.ibm.com> <437E0B62.4000306@us.ibm.com> <1132340265.5720.191.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Ian Kent , autofs mailing list , linux-fsdevel Return-path: Received: from e2.ny.us.ibm.com ([32.97.182.142]:41131 "EHLO e2.ny.us.ibm.com") by vger.kernel.org with ESMTP id S932321AbVKRUJF (ORCPT ); Fri, 18 Nov 2005 15:09:05 -0500 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e2.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id jAIK94SB013919 for ; Fri, 18 Nov 2005 15:09:04 -0500 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.12.10/NCO/VERS6.8) with ESMTP id jAIK94ma124056 for ; Fri, 18 Nov 2005 15:09:04 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11/8.13.3) with ESMTP id jAIK94Sa004408 for ; Fri, 18 Nov 2005 15:09:04 -0500 To: Ram Pai In-Reply-To: <1132340265.5720.191.camel@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Ram Pai wrote: > On Fri, 2005-11-18 at 09:12, William H. Taber wrote: > > I think the problem is with cached_lookup(). It is the only place which > calls ->revalidate() holding the parent's inode-semaphore AFAICT. > > note: cached_lookup() is only called from __lookup_hash() and > __lookup_hash() is always called holding the semaphore. > > VFS experts agree? > RP > Ram, Lookup_one_len calls lookup_hash and it is the callers of lookup_one_len that are problematical. Just as an example, lookup_one_len is called from nfs_sillyrename which is called, among other places in the nfs_rename code. In that path the parent i_sem is obtained in do_rename in the vfs code (namei.c). I would think that it would be extremely difficult to to change that usage. The alternative is to move the obtaining of the parent i_sem from real_lookup to do_lookup. We would also have to put the locking around the d_revalidate call at return_reval in __link_path_walk. Again, what do the VFS experts think? Will Taber