Whamcloud - gitweb
LU-13004 ptlrpc: Allow BULK_BUF_KIOV to accept a kvec
[fs/lustre-release.git] / lustre / doc / llapi_group_lock.3
1 .TH llapi_group_lock 3 "2014 Oct 03" "Lustre User API"
2 .SH NAME
3 llapi_group_lock, llapi_group_unlock \- get and put a Lustre group lock.
4 .SH SYNOPSIS
5 .nf
6 .B #include <lustre/lustreapi.h>
7 .PP
8 .BI "int llapi_group_lock(int "fd ", int "gid );
9
10 .BI "int llapi_group_unlock(int "fd ", int "gid );
11 .fi
12 .SH DESCRIPTION
13 .PP
14 The function
15 .BR llapi_group_lock()
16 takes a group lock on the file descriptor
17 .I fd
18 with group identifier
19 .IR gid .
20
21 The function
22 .BR llapi_group_unlock()
23 releases a group lock identified by group identifier
24 .I gid
25 on the file descriptor
26 .IR fd .
27
28 The group lock is a whole file lock that blocks concurrent I/O originating from descriptors that have not been locked. Multiple processes can acquire a lock by specifying the same group identifier.
29
30 .SH RETURN VALUES
31 .LP
32 .B llapi_group_lock(\|)
33 and
34 .B llapi_group_unlock(\|)
35 return 0 on success or a negative errno value on failure.
36 .SH ERRORS
37 .TP 15
38 .SM -EBADF
39 .I fd
40 is not a valid file descriptor.
41 .TP
42 .SM -ENOTTY
43 .I fd
44 does not describe an object suitable for this request.
45 .TP
46 .SM -EINVAL
47 .I fd
48 is already group locked with a different group identifier.
49 .TP
50 .SH "SEE ALSO"
51 .BR lustreapi (7)