dlm_unlock man page on Scientific

Man page or keyword search:  
man Server   26626 pages
apropos Keyword Search (all sections)
Output format
Scientific logo
[printable version]


       dlm_unlock - unlock a DLM lock

       #include <libdlm.h>

       int dlm_unlock(uint32_t lkid,
		      uint32_t flags, struct dlm_lksb *lksb, void *astarg);

       int dlm_unlock_wait(uint32_t lkid,
			   uint32_t flags, struct dlm_lksb *lksb);

       dlm_unlock()  unlocks  a	 lock  previously acquired by dlm_lock and its

       Unless dlm_unlock_wait() is used unlocks are also asynchronous. The AST
       routine	is  called  when  the  resource	 is successfully unlocked (see

       lkid Lock ID as returned in the lksb

       flags flags affecting the unlock operation:
	 LKF_CANCEL	  Cancel a pending lock or conversion.
			  This returns the lock to it's previously
			  granted mode (in case of a conversion) or
			  unlocks it (in case of a waiting lock).
	 LKF_IVVALBLK	  Invalidate value block
	 LKF_FORCEUNLOCK  Unlock the lock even if it's waiting.

       lksb LKSB to return status and value block information.

       astarg New parameter to be passed to the completion AST.	  The  compleā€
       tion  AST  routine  is  the  last completion AST routine specified in a
       dlm_lock call.  If dlm_lock_wait() was the  last	 routine  to  issue  a
       lock, dlm_unlock_wait() must be used to release the lock. If dlm_lock()
       was the last routine to	issue  a  lock	then  either  dlm_unlock()  or
       dlm_unlock_wait() may be called.

   Return values
       0  is  returned	if  the	 call  completed  successfully.	 If not, -1 is
       returned and errno is set to one of the following:

       EINVAL	       An invalid parameter was passed to the call (eg bad
		       lock mode or flag)
       EINPROGRESS     The lock is already being unlocked
       EBUSY	       The lock is currently being locked or converted
       ENOTEMPTY       An attempt to made to unlock a parent lock that still has
		       child locks.
       ECANCEL	       A lock conversion was successfully cancelled
       EUNLOCK	       An unlock operation completed successfully
		       (sb_status only)
       EFAULT	       The userland buffer could not be read/written by the
       If an error is returned in the AST, then lksb.sb_status is set  to  the
       one of the above numbers instead of zero.

       int status;
       struct dlm_lksb lksb;

       status = dlm_lock_wait(LKM_EXMODE,
			      0,     // Parent,
			      NULL,  // bast arg
			      NULL,  // bast routine,
			      NULL); // Range

       if (status == 0)
	    dlm_unlock_wait(lksb.sb_lkid, 0, &lksb);

       libdlm(3), dlm_lock(3), dlm_open_lockspace(3), dlm_create_lockspace(3),
       dlm_close_lockspace(3), dlm_release_lockspace(3)

libdlm functions		 July 5, 2007			 DLM_UNLOCK(3)

List of man pages available for Scientific

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net