From owner-freebsd-hackers Tue Oct 2 23:10:48 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from beastie.mckusick.com (beastie.mckusick.com [209.31.233.184]) by hub.freebsd.org (Postfix) with ESMTP id 7924037B403; Tue, 2 Oct 2001 23:10:46 -0700 (PDT) Received: from beastie.mckusick.com (localhost [127.0.0.1]) by beastie.mckusick.com (8.11.4/8.9.3) with ESMTP id f936AbR11859; Tue, 2 Oct 2001 23:10:37 -0700 (PDT) (envelope-from mckusick@beastie.mckusick.com) Message-Id: <200110030610.f936AbR11859@beastie.mckusick.com> To: Ian Dowse Cc: Matt Dillon , Yevgeniy Aleynikov , peter@FreeBSD.ORG, ache@FreeBSD.ORG, Ken Pizzini , hackers@FreeBSD.ORG Subject: Re: bleh. Re: ufs_rename panic In-Reply-To: Your message of "Tue, 02 Oct 2001 21:52:48 BST." <200110022152.aa36964@salmon.maths.tcd.ie> Date: Tue, 02 Oct 2001 23:10:37 -0700 From: Kirk McKusick Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The problems all arise from the fact that we unlock the source while we look up the destination, and when we return to relookup the source, it may have changed/moved/disappeared. The reason to unlock the source before looking up the destination was to avoid deadlocking against ourselves on a lock that we held associated with the source. Since we now allow recursive locks on vnodes, it is no longer necessary to release the source before looking up the destination. So, it seems to me that the correct fix is to *not* release the source after looking it up, but rather hold it locked while we look up the destination. We can completely get rid of relookup and lots of other hairy code and generally make rename much simpler. Am I missing something here? ~Kirk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message