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

dlm_glc_destroy(3)

NAME

dlm_glc_destroy - Destroys a group lock container

LIBRARY

Distributed Lock Manager Library (libdlm.a)

SYNOPSIS

#include <sys/dlm.h> dlm_status_t dlm_glc_destroy ( dlm_glc_id_t id, dlm_glc_flags_t flags );

PARAMETERS

id Handle to the group lock container that is to be destroyed. The group lock container ID is returned by a previous call to dlm_glc_create. flags When provided, specifies flags that modify the operation. The flags parameter is a bit mask that is the logical OR of each bit set, where each bit corresponds to an option. The dlm_glc_flags structure defines a symbolic name for each flag bit. The following list describes each flag: DLM_GLC_LOCKS Causes the distributed lock manager (DLM) to destroy a group lock container that currently holds locks if no processes are attached to it. DLM_GLC_FORCE Causes the DLM to destroy a group lock container even if processes are attached to it. All processes in the process lock group are killed and all group locks are released. (If this results in the release of the last lock on a persistent resource, the resource itself may survive as discussed in the dlm_rd_attach function.) Finally, any recovery domain IDs any process may have obtained by prior calls to the dlm_rd_attach function on behalf of the process lock group are destroyed.

DESCRIPTION

The dlm_glc_destroy() function destroys a group lock container. Normally, the container to be destroyed must have no processes attached to it and contain no locks. However, you can use the DLM_GLC_LOCKS or DLM_GLC_FORCE flag to destroy a container that is in use. The process that calls dlm_glc_destroy() must either have root privileges, be the group lock container's creator, or be a member of one of the namespaces to which the group lock container is attached.

RETURN VALUES

Upon completion, the dlm_glc_destroy() function call returns one of the following values: DLM_SUCCESS The operation was completed successfully. DLM_BADPARAM Illegal flags were specified. DLM_ENOENT The specified group lock container does not exist. DLM_ENOSYS The DLM is not enabled. DLM_HASLOCKS The specified group lock container contains locks and the DLM_GLC_LOCKS flag was not specified. DLM_HASPROCS The specified group lock container has processes attached to it and cannot be destroyed. DLM_KILLFAIL A process attached to the group lock container could not be killed. Some processes may have been killed but no group locks have been released. DLM_NOACCESS The process does not have sufficient privileges to destroy the specified container. DLM_NOTATTACHED The process is not attached to either the DLM or to the group lock container specified in the id parameter.

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_get_rsbinfo(3), dlm_glc_create(3), dlm_glc_attach(3), dlm_glc_detach(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