[Openais] [PATCH]: openais/trunk: Remove lock in saLckResourceUnlockCallback

Steven Dake sdake at redhat.com
Sat Jun 27 00:06:11 PDT 2009


looks good for merge

regards
-steve

On Fri, 2009-06-26 at 21:50 -0500, Ryan O'Hara wrote:
> This patch changes the behavior of saLckResourceUnlock,
> saLckResourceUnlockAsync, and saLckDispatch.
> 
> The old code would remove a lock as soon as either Unlock or
> UnlockAsync received a result from the exec without error. The two
> calls were exactly the same except that the async call generated a
> callback.
> 
> This patch changes saLckResourceUnlockAsync such that the lock is not
> removed from the database in the library until the callback it made.
> 
> This patch also changes both saLckResourceUnlock and
> saLckResourceUnlockAsync such that if a lock is not found in the
> executive layer, we do not return an error. it is valid for the
> lock_id to exist in the library database but not the executive, as
> this is a symptom of having an async unlock do the unlock but not
> remove the lock from the database in the library because its callback
> has not yet been processed.
> 
> Finally, saLckDispatch changes the way it deals with resource unlock
> callbacks. If the lock_id specified in the callback exists, we remove
> it. It it does not exist, it means that the lock was removed while the
> callback was waiting to be processed. In this case we return
> SA_AIS_ERR_NOT_EXIST, per the spec.
> 
> Ryan
> 
> _______________________________________________
> Openais mailing list
> Openais at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/openais



More information about the Openais mailing list