Index Index for
Section 3
Index Alphabetical
listing for D
Bottom of page Bottom of
page

dlm_get_rsbinfo(3)

NAME

dlm_get_rsbinfo - Obtain locking information about resources managed by the distributed lock manager (DLM)

LIBRARY

Distributed Lock Manager Library (libdlm.a)

SYNOPSIS

#include <sys/dlm.h> dlm_status_t dlm_get_rsbinfo ( dlm_nsp_t nsp, uchar_t *resnam, ushort_t resnlen, dlm_rsbinfo_t *rsbinfo, dlm_lkid_t *par_lkid );

PARAMETERS

nsp Specifies a handle that identifies the namespace. resnam Specifies the name of the resource for which the DLM is to return lock information. The resnam parameter is the address of a 1 to DLM_RESNAMELEN byte string. resnlen Specifies the length of the resource name. Resource names must be from 1 to DLM_RESNAMELEN bytes long. rsbinfo Specifies the address of a buffer to which dlm_get_rsbinfo copies the contents of the dlm_rsbinfo_t structure for the resource. par_lkid Specifies the address of the parent lock ID. Use this parameter to identify a subresource, or pass a zero (0) if this is the root resource.

DESCRIPTION

The dlm_get_rsbinfo() function returns lock information about resources managed by the DLM. It uses the specified resource name to locate the resource in the given namespace. It then returns the dlm_rsbinfo_t structure for the resource to the buffer specified by the rsbinfo parameter. To successfully use the dlm_get_rsbinfo() function, an application must have previously attached to the resource's namespace by calling the dlm_nsjoin() function. The dlm_rsbinfo_t structure is defined by in the dlm.h header file, as follows: typedef struct { short vbstatus; uint_t vbseqnum; uint_t subrescnt; uint_t lckcnt; uint_t blkastcnt; uint_t ggcnt; dlm_lkmode_t ggmode; dlm_lkmode_t cvtqmode; dlm_lkmode_t wtqmode; dlm_valb_t valb; } dlm_rsbinfo_t; The following table defines the members of the dlm_rsbinfo_t structure: __________________________________________ Member Definition __________________________________________ vbstatus Lock value block status. If 0, the lock value block is valid; if 1, the lock value block is invalid. vbseqnum Current lock value block sequence number. subrescnt Count of subresources. lckcnt Number of locks on the resource. blkastcnt Number of locks on the resource with blocking asynchronous system traps (ASTs). ggcnt Number of locks at resource group grant mode. ggmode Resource group grant mode. The dlm_get_rsbinfo function returns a DLM_NOMODE value to this field, if the resource block is in transition between resource masters at the time of the call. cvtqmode Requested mode of first lock on conversion queue. wtqmode Requested mode of first lock on wait queue. valb Current copy of resource lock value block. __________________________________________

RETURN VALUES

Upon completion, the dlm_get_rsbinfo() function returns one of the following values: DLM_SUCCESS The request for lock information about the resource successfully completed. DLM_BADPARAM The rsbinfo parameter was not specified. DLM_EFAULT An error occurred in the copy operation to or from the DLM database. DLM_ENOENT The specified resource does not exist in the specified namespace. DLM_ENOSYS The DLM is not enabled. DLM_INTR The process has aborted the dlm_get_rsbinfo request before completion. DLM_IVBUFLEN The length of the resource name is less than 1 or greater than DLM_RESNAMELEN. DLM_IVLOCKID You specified an invalid or nonexistent lock identification for the parent lock ID. DLM_NOACCESS This process is not permitted access to the namespace. DLM_NOTATTACHED The process has not yet joined the namespace identified by the nsp parameter, or the nsp parameter is less than zero (0) or greater than or equal to DLM_NSPROCMAX.

FILES

/usr/include/sys/dlm.h DLM library header file. /usr/examples/cluster/api_ex_master.c|api_ex_client.c Source files for an example showing lock conversion and value block usage.

RELATED INFORMATION

Functions: dlm_cancel(3), dlm_cvt(3), dlm_detach(3), dlm_get_lkinfo(3), dlm_glc_attach(3), dlm_glc_create(3), dlm_glc_detach(3), dlm_glc_destroy(3), dlm_lock(3), dlm_notify(3), dlm_nsjoin(3), dlm_nsleave(3),dlm_perrno(3), dlm_quecvt(3), dlm_quelock(3), dlm_rd_attach(3), dlm_rd_collect(3), dlm_rd_detach(3), dlm_rd_validate(3), dlm_set_signal(3), dlm_unlock(3) File: dlm(4) TruCluster Server Cluster Highly Available Applications

Index Index for
Section 3
Index Alphabetical
listing for D
Top of page Top of
page