DLM_UNLOCK - Online Linux Manual PageSection : 3
Updated : July 5, 2007
Source : libdlm functions
NAMEdlm_unlock − unlock a DLM lock
SYNOPSIS#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);
DESCRIPTIONdlm_unlock() unlocks a lock previously acquired by dlm_lock and its variants. Unless dlm_unlock_wait() is used unlocks are also asynchronous. The AST routine is called when the resource is successfully unlocked (see below). 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 completion 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 values0 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
kernelIf an error is returned in the AST, then lksb.sb_status is set to the one of the above numbers instead of zero.
EXAMPLEint status;
struct dlm_lksb lksb;
status = dlm_lock_wait(LKM_EXMODE,
&lksb,
LKF_NOQUEUE,
"MyLock",
strlen("MyLock"),
0, // Parent,
NULL, // bast arg
NULL, // bast routine,
NULL); // Range
if (status == 0)
dlm_unlock_wait(lksb.sb_lkid, 0, &lksb);
SEE ALSOlibdlm(3), dlm_lock(3), dlm_open_lockspace(3), dlm_create_lockspace(3), dlm_close_lockspace(3), dlm_release_lockspace(3) 0
Johanes Gumabo
Data Size : 7,687 byte
man-dlm_unlock.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 199,983
Visitor ID : :
Visitor IP : 3.12.163.120 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.