From owner-freebsd-current@FreeBSD.ORG Wed May 14 19:07:16 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 2EF6637B404; Wed, 14 May 2003 19:07:16 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1487C43F75; Wed, 14 May 2003 19:07:15 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9/8.12.9) with ESMTP id h4F274M7054223; Wed, 14 May 2003 19:07:08 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200305150207.h4F274M7054223@gw.catspoiler.org> Date: Wed, 14 May 2003 19:07:03 -0700 (PDT) From: Don Lewis To: rwatson@FreeBSD.org In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: bsder@allcaps.org 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: Thu, 15 May 2003 02:07:16 -0000 On 14 May, Robert Watson wrote: > > Per your suggestion, the attached changes do cause a non-blocking request > to now get "the right error" -- my only concern is whether or not this is > too sweeping a mapping of this error case. The spec lists LCK_DENIED as > "Indicates that the procedure failed because the request conflicted with > existing lock reservations for the file", but doesn't appear to offer an > error that denies the locked based on local configuration (security), etc. I think EAGAIN is a better fit for that definition of LCK_DENIED. Also fcntl() and fcntl() don't include EACCES as one of their error returns. > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > robert@fledge.watson.org Network Associates Laboratories > > RCS file: /data/ncvs/src/usr.sbin/rpc.lockd/kern.c,v > retrieving revision 1.11 > diff -u -r1.11 kern.c > --- kern.c 15 Aug 2002 21:52:21 -0000 1.11 > +++ kern.c 14 May 2003 22:00:41 -0000 > @@ -487,7 +487,7 @@ > break; > case nlm4_denied: > if (pid_p == NULL) > - ans.la_errno = EACCES; > + ans.la_errno = EAGAIN; > else { > /* this is an answer to a nlm_test msg */ > ans.la_set_getlk_pid = 1; > @@ -530,7 +530,7 @@ > break; > case nlm_denied: > if (pid_p == NULL) > - ans.la_errno = EACCES; > + ans.la_errno = EAGAIN; > else { > /* this is an answer to a nlm_test msg */ > ans.la_set_getlk_pid = 1; >