Whamcloud - gitweb
LU-16822 lnet: always initialize IPv6 at start up
[fs/lustre-release.git] / lustre / doc / llapi_changelog_clear.3
1 .TH llapi_changelog_clear 3 "2022-11-08" "" "Lustre User API"
2 .SH NAME
3 llapi_changelog_clear \- Clear changelog records for a changelog consumer
4 .SH SYNOPSIS
5 .nf
6 .B #include <lustre/lustreapi.h>
7 .PP
8 .BI "int llapi_changelog_clear(const char *" mdtname ", const char *" idstr ",
9 .BI "                          long long " endrec ");"
10 .fi
11 .SH DESCRIPTION
12 .PP
13 The function
14 .B llapi_changelog_clear()
15 indicates that changelog records previous to
16 .I endrec
17 are no longer of interest to a particular consumer
18 .I idstr
19 , potentially allowing the MDT
20 .I mdtname
21 (e.g: "lustrefs-MDT0000") to free up disk space.
22 .PP
23 An
24 .I endrec
25 of 0 indicates the current last record.
26 .PP
27 Changelog consumers must be registered on the
28 MDT node using:
29 .br
30 .BI "lctl --device " MDT_NAME " changelog_register"
31 .SH RETURN VALUES
32 .PP
33 Return the file descriptor on success or a negative errno value on failure.
34 .SH ERRORS
35 .TP 15
36 .SM -EINVAL
37 One or more invalid arguments are given.
38 .TP
39 .SM -ENOENT
40 MDT's changelog char device or changelog user not found.
41 .TP
42 .SM -ENOPERM
43 Not enough permissions to open the changelog char device. By default, the device
44 is only accessible to the root user.
45 .SH EXAMPLE
46 An example can be found for in lfs.c source file.
47 .B lfs_changelog_clear
48 implements the following command:
49 .br
50 .BI "lfs changelog_clear " MDTNAME " " ID " " ENDREC ""
51 .SH "SEE ALSO"
52 .BR lfs-changelog_clear (1),
53 .BR llapi_changelog_get_fd (3)
54 .BR llapi_changelog_in_buf (3),
55 .BR llapi_changelog_recv (3),
56 .BR llapi_changelog_start (3),
57 .BR lustreapi (7),
58 .BR lctl-changelog_register (8)