The attached patch contains the following changes: 1) Track process which owns locks Support is added for tracking the pid of the process which owns a lock. This is returned from a query operation and used in debug_log() messages. 2) Change rules for granting new locks When the LSFL_NOCONVGRANT flag is specified for a lockspace the rules for granting a new lock are: 1) There must be no locks on the conversion queue 2) There must be no other locks on the grant queue 3) Change rules for granting locks when a lock is released or converted to a lower mode When the LSFL_NOCONVGRANT flag is specified for a lockspace the rules for granting pending locks when a lock is released/converted down are: 1) Only the lock at the head of a queue and any compatible locks which immediately follow it are eligible to be granted. 2) The waiting queue is only processed if the conversion queue is empty 4) Added LKF_GRNLEXPEDITE The current LKF_EXPEDITE flag means that if the lock has to be queued, it is queued at the head of the queue. LKF_GRNLEXPEDITE has meaning when LSFL_NOCONVGRANT is specified. It is only valid on a grant request for a NL lock and it means that the lock is granted regardless of whether there are any locks waiting on a queue.
Attachment:
patch.pid-and-lockorder
Description: Binary data