Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 May 2003 19:07:03 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        rwatson@FreeBSD.org
Cc:        current@FreeBSD.org
Subject:   Re: rpc.lockd spinning; much breakage
Message-ID:  <200305150207.h4F274M7054223@gw.catspoiler.org>
In-Reply-To: <Pine.NEB.3.96L.1030514181016.12519A-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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;
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305150207.h4F274M7054223>