Whamcloud - gitweb
LU-17385 tests: always_except sanity-lfsck/24
[fs/lustre-release.git] / lustre / doc / llapi_changelog_recv.3
1 .TH llapi_changelog_recv 3 "2022-11-08" "" "Lustre User API"
2 .SH NAME
3 llapi_changelog_recv, llapi_changelog_free \- Read and free a changelog records
4 .SH SYNOPSIS
5 .nf
6 .B #include <lustre/lustreapi.h>
7 .PP
8 .BI "int llapi_changelog_recv(void *" priv ", struct changelog_rec **" rech ");"
9 .PP
10 .BI "int llapi_changelog_free(struct changelog_rec **" rech ");"
11 .fi
12 .SH DESCRIPTION
13 .PP
14 The function
15 .B llapi_changelog_recv()
16 allocates and reads the next changelog record
17 .I rech
18 from the changelog reader instance
19 .IR priv .
20 .PP
21 The function
22 .B llapi_changelog_free()
23 releases the allocated record
24 .IR rech .
25 .SH NOTES
26 If
27 .B llapi_changelog_start()
28 initializes
29 .I priv
30 with CHANGELOG_FLAG_FOLLOW flag,
31 .B llapi_changelog_recv()
32 can block waiting for new records.
33 .SH RETURN VALUES
34 .TP 15
35 .SM 0
36 On success
37 .TP
38 .SM 1
39 End of records
40 .TP
41 .SM -errno
42 On failure.
43 .SH ERRORS
44 .TP 15
45 .SM -ENOMEM
46 Insufficient memory to complete operation.
47 .TP
48 .SM -EINVAL
49 One or more invalid arguments are given.
50 .TP
51 .SM -EIO
52 Failed to read the changelog record on the MDT.
53 .SH EXAMPLE
54 An example can be found for in lfs.c source file.
55 .B lfs_changelog()
56 implements the following command:
57 .br
58 .BI "lfs changelog [--follow] " MDTNAME " [" STARTREC " [" ENDREC "]]"
59 .SH "SEE ALSO"
60 .BR lfs-changelog (1),
61 .BR llapi_changelog_clear (3),
62 .BR llapi_changelog_get_fd (3),
63 .BR llapi_changelog_in_buf (3),
64 .BR llapi_changelog_start (3),
65 .BR lustreapi (7)