-.TH llapi_changelog_clear 3 "2022-11-08" "" "Lustre User API"
+.TH LLAPI_CHANGELOG_CLEAR 3 2024-08-22 "Lustre User API" "Lustre Library Functions"
.SH NAME
llapi_changelog_clear \- Clear changelog records for a changelog consumer
.SH SYNOPSIS
.BI " long long " endrec ");"
.fi
.SH DESCRIPTION
-.PP
The function
.B llapi_changelog_clear()
indicates that changelog records previous to
.br
.BI "lctl --device " MDT_NAME " changelog_register"
.SH RETURN VALUES
-.PP
Return the file descriptor on success or a negative errno value on failure.
.SH ERRORS
.TP 15
An example can be found in lfs.c source file.
.B lfs_changelog_clear
implements the following command:
-.br
+.EX
.BI "lfs changelog_clear " MDTNAME " " ID " " ENDREC ""
-.SH "SEE ALSO"
+.EE
+.SH AVAILABILITY
+.B llapi_changelog_clear()
+is part of the
+.BR lustre (7)
+user application interface library since before release 2.4.0
+.\" Added in commit 2.3.53-7-gf715e4e298
+.SH SEE ALSO
.BR lfs-changelog_clear (1),
-.BR llapi_changelog_get_fd (3)
+.BR llapi_changelog_get_fd (3),
.BR llapi_changelog_in_buf (3),
.BR llapi_changelog_recv (3),
.BR llapi_changelog_start (3),
-.TH llapi_changelog_get_fd 3 "2022-11-08" "" "Lustre User API"
+.TH LLAPI_CHANGELOG_GET_FD 3 "2024-08-22 "Lustre User API" "Lustre Library Functions"
.SH NAME
llapi_changelog_get_fd \- Return the file descriptor of the changelog device
.SH SYNOPSIS
.BI "int llapi_changelog_get_fd(void *" priv ");"
.fi
.SH DESCRIPTION
-.PP
The function
.B llapi_changelog_get_fd()
returns the file descriptor of changelog char device for the instance
on the file descriptor to get events on the
changelog device.
.SH RETURN VALUES
-.PP
Return the file descriptor on success or a negative errno value on failure.
.SH ERRORS
.TP 15
.SM -EINVAL
.I priv
argument is invalid.
-.SH "SEE ALSO"
+.SH AVAILABILITY
+.B llapi_changelog_get_fd
+is part of the
+.BR lustre (7)
+user application interface library since release 2.4.0
+.\# Added in commit 2.3.53-7-gf715e4e298
+.SH SEE ALSO
.BR poll (2),
-.BR llapi_changelog_clear (3)
+.BR llapi_changelog_clear (3),
.BR llapi_changelog_in_buf (3),
.BR llapi_changelog_recv (3),
.BR llapi_changelog_start (3),
-.TH llapi_changelog_in_buf 3 "2022-11-08" "" "Lustre User API"
+.TH LLAPI_CHANGELOG_IN_BUF 3 2024-08-22 "Lustre User API" "Lustre Library Functions"
.SH NAME
llapi_changelog_in_buf \- Check if there is changelog records in the internal buffer
.SH SYNOPSIS
.BI "int llapi_changelog_in_buf(void *" priv ");"
.fi
.SH DESCRIPTION
-.PP
The function
.B llapi_changelog_in_buf()
checks if there are still changelog records in the read buffer for the
.B llapi_changelog_recv()
can be used to dequeue all the changelog records still in the read buffer.
.SH RETURN VALUES
-.PP
Returns 1 if changelogs records are present in the internal read buffer,
otherwise return 0.
-.SH "SEE ALSO"
-.BR llapi_changelog_clear (3)
+.SH AVAILABILITY
+.B llapi_changelog_in_buf
+is part of the
+.BR lustre (7)
+user application interface library since release 2.13.0
+.\# Added in commit 2.12.56-87-ge215002883
+.SH SEE ALSO
+.BR llapi_changelog_clear (3),
.BR llapi_changelog_get_fd (3),
.BR llapi_changelog_recv (3),
.BR llapi_changelog_start (3),
-.TH llapi_changelog_recv 3 "2022-11-08" "" "Lustre User API"
+.TH LLAPI_CHANGELOG_RECV 3 2024-08-22 "Lustre User API" "Lustre Library Functions"
.SH NAME
llapi_changelog_recv, llapi_changelog_free \- Read and free a changelog records
.SH SYNOPSIS
.BI "int llapi_changelog_free(struct changelog_rec **" rech ");"
.fi
.SH DESCRIPTION
-.PP
The function
.B llapi_changelog_recv()
allocates and reads the next changelog record
An example can be found for in lfs.c source file.
.B lfs_changelog()
implements the following command:
-.br
+.EX
.BI "lfs changelog [--follow] " MDTNAME " [" STARTREC " [" ENDREC "]]"
-.SH "SEE ALSO"
+.EE
+.SH AVAILABILITY
+.B llapi_changelog_recv
+is part of the
+.BR lustre (7)
+user application interface library since release 2.4.0
+.\# Added in commit 2.3.53-7-gf715e4e298
+.SH SEE ALSO
.BR lfs-changelog (1),
.BR llapi_changelog_clear (3),
.BR llapi_changelog_get_fd (3),
-.TH llapi_changelog_start 3 "2022-11-08" "" "Lustre User API"
+.TH LLAPI_CHANGELOG_START 3 2024-08-22 "Lustre User API" "Lustre Library Functions"
.SH NAME
llapi_changelog_start, llapi_changelog_set_xflags, llapi_changelog_fini \- Initialize and clean a read instance for MDT changelogs
.SH SYNOPSIS
.BI "int llapi_changelog_fini(void **" priv ");"
.fi
.SH DESCRIPTION
-.PP
The function
.B llapi_changelog_start()
initializes a new instance
corresponding to the MDT's name given by
.I device
(e.g: "lustrefs-MDT0000").
-.br
+.P
A changelog starting point can be specified with
.I startrec
record number.
.PP
.B enum changelog_send_flag
values:
-.nf
-.LP
+.EX
CHANGELOG_FLAG_FOLLOW
CHANGELOG_FLAG_BLOCK
CHANGELOG_FLAG_JOBID
CHANGELOG_FLAG_EXTRA_FLAGS
-.fi
+.EE
.TP
CHANGELOG_FLAG_FOLLOW
Use changelog follow mode:
.B llapi_changelog_recv()
-will not return when all records have been read. Instead it will block until a
+will not return when all records have been read. Instead it will block until a
new record is available. It avoids restarting an instance and re-scan for newer
changelogs.
.TP
.PP
.B enum changelog_send_extra_flag
values:
-.nf
-.LP
+.EX
CHANGELOG_EXTRA_FLAG_UIDGID
CHANGELOG_EXTRA_FLAG_NID
CHANGELOG_EXTRA_FLAG_OMODE
CHANGELOG_EXTRA_FLAG_XATTR
-.fi
+.EE
.TP
CHANGELOG_EXTRA_FLAG_UIDGID
Pack uid/gid into the changelog record
An example can be found for in lfs.c source file.
.B lfs_changelog()
implements the following command:
-.br
+.EX
.BI "lfs changelog [--follow] " MDTNAME " [" STARTREC " [" ENDREC "]]"
-.SH "SEE ALSO"
+.EE
+.SH AVAILABILITY
+.B llapi_changelog_start
+is part of the
+.BR lustre (7)
+user application interface library since release 2.4.0
+.\# Added in commit 2.3.53-7-gf715e4e298
+.SH SEE ALSO
.BR lfs-changelog (1),
-.BR llapi_changelog_clear (3)
+.BR llapi_changelog_clear (3),
.BR llapi_changelog_get_fd (3),
.BR llapi_changelog_in_buf (3),
.BR llapi_changelog_recv (3),