 |
Index for Section 3 |
|
 |
Alphabetical listing for D |
|
 |
Bottom of page |
|
dlm_nsjoin(3)
NAME
dlm_nsjoin - Connects the process to the specified resource namespace
(provided in Production Server configurations only)
LIBRARY
Distributed Lock Manager Library (libdlm.a)
SYNOPSIS
#include <sys/dlm.h>
dlm_status_t dlm_nsjoin (
dlm_nsid_t nsid,
dlm_nsp_t *nsp,
dlm_flags_t flags );
PARAMETERS
nsid Identifies the resource namespace. Specify either a zero (0) for
a systemwide namespace, a user ID (UID), or a group ID (GID).
The process must hold this ID for access to the namespace to be
granted.
nsp Receives a handle that identifies the namespace. An application
supplies this handle on subsequent calls to the dlm_lock,
dlm_locktp, dlm_quelock, and dlm_quelocktp functions when
creating a root lock in the namespace.
flags 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_flags_t structure defines a symbolic name for each flag
bit. The following list describes each flag:
DLM_GROUP Indicates that nsid specifies an effective group ID
(EGID) qualified namespace. The process must be a
member of this group.
DLM_USER Indicates that nsid specifies an effective user ID
(EUID) qualified namespace. The process must hold this
user ID. A user ID of zero (0) indicates a systemwide
namespace. In that case, the process must have root
privilege.
DESCRIPTION
The dlm_nsjoin function connects the process to the specified namespace for
locking.
A namespace can be viewed as a container for resource names. Multiple
namespaces exist to provide separation of unrelated applications for
reasons of security and modularity. The namespaces are qualified by either
EUID or EGID.
The application must request access to a namespace before attempting to
acquire a lock on a resource in that namespace. The distributed lock
manager (DLM) verifies that the application is permitted to access the
indicated namespace by verifying that the process holds the appropriate
group ID, user ID, or root privilege as needed for that namespace. The
lock manager returns a handle to the namespace. The application presents
this handle on subsequent calls to acquire root locks. Sublocks can be
added to a root lock without further access checks.
The DLM_NSPROCMAX symbol specifies the maximum number of namespaces of
which a process can be a member. A process can join, leave, and then
rejoin the same namespace. After a process has joined a namespace,
subsequent calls to the dlm_nsjoin function for the same namespace will
fail until the process successfully completes a dlm_nsleave request for
that namespace.
It is the cluster administrator's responsibility to keep namespaces (for
instance group and user IDs) consistent across the cluster.
RETURN VALUES
Upon completion, the dlm_nsjoin function returns one of the following
values:
DLM_SUCCESS
Connection was made to the namespace and a handle was returned.
DLM_ATTACHED
This process has already joined the namespace.
DLM_BADPARAM
The nsp parameter was not specified or an illegal flag was
specified.
DLM_EFAULT
An error occurred in the copy operation to or from the DLM
database.
DLM_ENOSYS
The lock subsystem is not loaded.
DLM_NOACCESS
This process is not permitted access to the namespace.
DLM_TOMANYNS
This process is not able to join any more namespaces because it
has already attached to the maximum number of namespaces, as
specified by the DLM_NSPROCMAX symbol.
FILES
/usr/include/sys/dlm.h
DLM library header file.
/usr/examples/cluster/api_ex_master.c|api_ex_client.c
Source file 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_attach(3), dlm_glc_create(3),
dlm_glc_detach(3), dlm_glc_destroy(3), dlm_lock(3), dlm_notify(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 Production Server Software Application Programming Interfaces
 |
Index for Section 3 |
|
 |
Alphabetical listing for D |
|
 |
Top of page |
|