From owner-freebsd-current@FreeBSD.ORG Tue May 13 00:05:22 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCBA937B401; Tue, 13 May 2003 00:05:22 -0700 (PDT) Received: from mail.allcaps.org (allcaps.org [216.240.173.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6287443FAF; Tue, 13 May 2003 00:05:22 -0700 (PDT) (envelope-from bsder@allcaps.org) Received: from mail.allcaps.org (localhost [127.0.0.1]) by mail.allcaps.org (Postfix) with ESMTP id 885D092FAF; Tue, 13 May 2003 03:08:20 -0400 (EDT) Received: from localhost (bsder@localhost)h4D78KFt031198; Tue, 13 May 2003 00:08:20 -0700 X-Authentication-Warning: mail.allcaps.org: bsder owned process doing -bs Date: Tue, 13 May 2003 00:08:20 -0700 (PDT) From: "Andrew P. Lentvorski, Jr." To: Robert Watson In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Don Lewis cc: alfred@FreeBSD.org cc: current@FreeBSD.org Subject: Re: rpc.lockd spinning; much breakage X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 07:05:23 -0000 On Mon, 12 May 2003, Robert Watson wrote: > (3) Sometimes rpc.lockd on 5.x acting as a server gets really confused > when you mix local and remote locks. Yes, don't do that. ;) One problem is that FreeBSD doesn't allocate enough fields in its local lock structure to distinguish external identifiers in the locks (all locks look like they are owned by the rpc.lockd user). Consequently, rpc.lockd has to maintain its own state as to who has what locks. I believe there were also some issues with atomicity in POSIX partial file locking on FreeBSD that have since been fixed. Consequently, I punted when I wrote the rpc.lockd code to support POSIX partial file locking. The server rpc.lockd locks the *entire file* when it gets an NFS request to lock any portion of it. In addition, it will return an immediate fail if the kernel has any portion of the desired file locked. -a