Re: rpc.lockd spinning; much breakage

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Wed, 14 May 2003 18:12:09 -0400 (EDT)
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. 

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert_at_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
_at__at_ -487,7 +487,7 _at__at_
 			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;
_at__at_ -530,7 +530,7 _at__at_
 			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;
Received on Wed May 14 2003 - 13:12:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:08 UTC