[Openais] [lck 1/4] Return SA_AIS_ERR_NOT_EXIST in saLckResourceUnlock
Ryan O'Hara
rohara at redhat.com
Thu Jun 4 09:27:00 PDT 2009
On Thu, Jun 04, 2009 at 06:12:13PM +0200, Jan Friesse wrote:
> This is very controversal, and I'm still not sure about correctnes
> of this. Becuase:
> - AIS B.03.01 don't have ERR_BAD_HANDLE as a posibility of returned code
> and can return only SA_AIS_ERR_NOT_EXIST
> - AIS B.01.01 can return ERR_BAD_HANDLE and ERR_NOT_EXISTS
>
> And because SAF Test is written for B.01.01, it expect support for
> both.
ACK, but I'd like to get Steve's opinion.
Honzaf is correct. The B.03.01 spec for the lock service does not
define SA_AIS_ERR_BAD_HANDLE for SaLckResourceUnlock. Instead it
defines SA_AIS_ERR_NOT_EXIST for a bad lockId. Since lockId's are kept
in a handle database in the lib, we should change the error returned
from hdb_handle_get to SA_AIS_ERR_NOT_EXIST. Make sense?
I think this will also apply to saLckResourceUnlockAsync, so we'll
need to make this change to that API call, too.
Ryan
> ---
> trunk/lib/lck.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/trunk/lib/lck.c b/trunk/lib/lck.c
> index 5e31885..5d2dbce 100644
> --- a/trunk/lib/lck.c
> +++ b/trunk/lib/lck.c
> @@ -1039,6 +1039,7 @@ saLckResourceUnlock (
> error = hdb_error_to_sa (hdb_handle_get (&lckLockIdHandleDatabase,
> lockId, (void *)&lckLockIdInstance));
> if (error != SA_AIS_OK) {
> + error = SA_AIS_ERR_NOT_EXIST;
> goto error_exit;
> }
>
> --
> 1.5.5.6
>
> _______________________________________________
> Openais mailing list
> Openais at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/openais
More information about the Openais
mailing list