From: Bob Glossman Date: Fri, 4 Mar 2016 17:45:22 +0000 (-0800) Subject: LU-7841 doc: stop using python-docutils X-Git-Tag: 2.8.51~25 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=4943ae1975dcd056143db2b31663414c9b1981a7 LU-7841 doc: stop using python-docutils Since python-docutils is a problem in some Linux distibutions don't use it. Convert the few manpage sources kept in .rst format to the more traditional nroff style so no conversion is needed at build time. Signed-off-by: Bob Glossman Change-Id: If64b4b504ee5bcacb688a721f479f181c53d99e0 Reviewed-on: http://review.whamcloud.com/18792 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index a748901..1ecaf8a 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -320,13 +320,6 @@ AC_ARG_ENABLE([manpages], [skip creation and inclusion of man pages (default is enable)]), [], [enable_manpages="yes"]) AC_MSG_RESULT([$enable_manpages]) -AS_IF([test "x$enable_manpages" = xyes], [ -AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], []) - if test "x$RST2MAN" = "x"; then - AC_MSG_ERROR( - [rst2man is needed to build the man pages. Install python-docutils.]) -fi -]) ]) # LB_CONFIG_MANPAGES # diff --git a/lustre.spec.in b/lustre.spec.in index 40c0b4b..8f0e709 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -97,9 +97,6 @@ Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap nfs-utils-lustre Provides: lustre-lite = %{version}, lustre-lite-utils = %{version} Requires: %{name}-modules = %{version} BuildRequires: libtool -%if %{with manpages} -BuildRequires: python-docutils -%endif %if %{with servers} Requires: lustre-osd Requires: lustre-osd-mount diff --git a/lustre/doc/Makefile.am b/lustre/doc/Makefile.am index 9ab9b0d..7bf1423 100644 --- a/lustre/doc/Makefile.am +++ b/lustre/doc/Makefile.am @@ -57,7 +57,8 @@ MANFILES = lustre.7 lfs.1 mount.lustre.8 lctl.8 lnetctl.8 \ llapi_hsm_copytool_unregister.3 llapi_hsm_copytool_get_fd.3 \ llapi_hsm_copytool_recv.3 llapi_hsm_action_end.3 \ llapi_hsm_action_progress.3 llapi_hsm_action_get_dfid.3 \ - llapi_hsm_action_get_fd.3 + llapi_hsm_action_get_fd.3 lustreapi.7 llapi_hsm_action_begin.3 \ + llapi_hsm_copytool_register.3 SERVER_MANFILES = mkfs.lustre.8 tunefs.lustre.8 @@ -67,25 +68,14 @@ else DISTONLY_MANFILES = $(SERVER_MANFILES) endif -# Generated manpages with their sources in ReST. Generated files are -# not part of the dist target; they may or may not have been -# generated (see --disable-manpages option). -RST_MANFILES = lustreapi.rst llapi_hsm_action_begin.rst \ - llapi_hsm_copytool_register.rst -GEN_MANFILES = lustreapi.7 llapi_hsm_action_begin.3 \ - llapi_hsm_copytool_register.3 - if UTILS if MANPAGES -man_MANS = $(MANFILES) $(GEN_MANFILES) +man_MANS = $(MANFILES) endif endif -.rst.3 .rst.7: - @RST2MAN@ $? $@ - -CLEANFILES = *.aux *.tex *.log *.pdf $(GEN_MANFILES) +CLEANFILES = *.aux *.tex *.log *.pdf -EXTRA_DIST = $(MANFILES) $(RST_MANFILES) $(DISTONLY_MANFILES) +EXTRA_DIST = $(MANFILES) $(DISTONLY_MANFILES) all: diff --git a/lustre/doc/llapi_hsm_action_begin.3 b/lustre/doc/llapi_hsm_action_begin.3 new file mode 100644 index 0000000..3f51dad --- /dev/null +++ b/lustre/doc/llapi_hsm_action_begin.3 @@ -0,0 +1,89 @@ +. +.TH LLAPI_HSM_ACTION_BEGIN 3 "2014-09-24" "" "Lustre HSM User API" +.SH NAME +llapi_hsm_action_begin \- Lustre API copytool management +. +.SH SYNOPSIS +.sp +\fB#include \fP +.sp +\fBint llapi_hsm_action_begin(struct hsm_copyaction_private **\fPphcp\fB, +const struct hsm_copytool_private *\fPct\fB, const struct +hsm_action_item *\fPhai\fB, int\fP restore_mdt_index\fB, int\fP +restore_open_flags\fB, bool\fP is_error\fB)\fP +.sp +\fBint llapi_hsm_action_end(struct hsm_copyaction_private **\fPphcp\fB, +const struct hsm_extent *\fPhe\fB, int\fP hp_flags\fB, int\fP errval\fB)\fP +.sp +\fBint llapi_hsm_action_progress(struct hsm_copyaction_private *\fPhcp\fB, +const struct hsm_extent *\fPhe\fB, __u64\fP total\fB, int\fP hp_flags\fB)\fP +.sp +\fBint llapi_hsm_action_get_dfid(const struct hsm_copyaction_private *\fPhcp\fB, +lustre_fid *\fPfid\fB)\fP +.sp +\fBint llapi_hsm_action_get_fd(const struct hsm_copyaction_private *\fPhcp\fB)\fP +.SH DESCRIPTION +.sp +When a copytool is ready to process an HSM action received through +\fBllapi_hsm_copytool_recv\fP(), it must first call +\fBllapi_hsm_action_begin\fP() to initialize the internal action +state, stored in \fIphcp\fP\&. \fIct\fP is the opaque copytools handle +previously returned by \fBllapi_hsm_copytool_register\fP(). \fIhai\fP is +the request. \fIrestore_mdt_index\fP and \fIrestore_open_flags\fP are only +used for an \fBHSMA_RESTORE\fP type of request. \fIrestore_mdt_index\fP is +the MDT index on which to create the restored file, or \-1 for +default. If the copytool does not intend to process the request, it +should set \fIis_error\fP to \fBtrue\fP, and then call +\fBllapi_hsm_action_end\fP(). +.sp +While performing a copy (i.e. the HSM request is either +\fBHSMA_ARCHIVE\fP or \fBHSMA_RESTORE\fP), the copytool can inform Lustre +of the progress of the operation with \fBllapi_hsm_action_progress\fP(). \fIhe\fP is the interval (\fIoffset\fP, \fIlength\fP) of the data copied. Each +interval must be unique; i.e. there must not be any overlap. \fIlength\fP +is the total length that is expected to be transfered. \fIhp_flags\fP +should be 0. The progress can be checked on any Lustre client by +calling \fBllapi_hsm_current_action\fP(), or by using \fBlfs +hsm_action\fP\&. +.sp +Once the HSM request has been performed, the destination file must be +closed, and \fBllapi_hsm_action_end\fP() must be called to free\-up the +allocated ressources and signal Lustre that the file is now available +to consumers. \fIerrval\fP is set to 0 on success. On error, it must be an +errno, and hp_flags can be set to \fBHP_FLAG_RETRY\fP if the request is +retryable, 0 otherwise. \fIhe\fP is the interval (\fIoffset\fP, \fIlength\fP) of +the data copied. It can be the \fIhai_extent\fP of the HSM request. +.sp +For a restore operation, a volatile file, invisible to ls, is +created. \fBllapi_hsm_action_get_fd\fP() will return a file descriptor +to it. It is the responsibility of the copytool to close the returned +file descriptor when the data transfer is +done. \fBllapi_hsm_action_get_dfid\fP() will return the FID of the volatile +file, which can then be used with \fBllapi_open_by_fid\fP() to open +the file in a different process, or on a different node. +.sp +\fBllapi_hsm_action_get_fd\fP() and \fBllapi_hsm_action_get_dfid\fP() +can be called for an archive operation too. The returned file +descriptor and the FID are from the file to be archived. +.SH RETURN VALUE +.sp +\fBllapi_hsm_action_get_fd\fP() returns a file descriptor on +success. The other functions return 0 on success. All functions return +a negative errno on failure. +.SH ERRORS +.sp +The negative errno can be, but is not limited to: +.TP +.B \fB\-EINVAL\fP An invalid value was passed, the copytool is not +registered, ... +.TP +.B \fB\-ENOMEM\fP Not enough memory to allocate a resource. +.SH SEE ALSO +.sp +\fBllapi_hsm_copytool_register\fP(3), \fBllapi_hsm_copytool_recv\fP(3), +\fBlustreapi\fP(7), \fBlfs\fP(1) +.sp +See \fIlhsmtool_posix.c\fP in the Lustre sources for a use case of this +API. +.SH AUTHOR +Frank Zago +. diff --git a/lustre/doc/llapi_hsm_action_begin.rst b/lustre/doc/llapi_hsm_action_begin.rst deleted file mode 100644 index fc6b740..0000000 --- a/lustre/doc/llapi_hsm_action_begin.rst +++ /dev/null @@ -1,109 +0,0 @@ -====================== -llapi_hsm_action_begin -====================== - ------------------------------- -Lustre API copytool management ------------------------------- - -:Author: Frank Zago -:Date: 2014-09-24 -:Manual section: 3 -:Manual group: Lustre HSM User API - - -SYNOPSIS -======== - -**#include ** - -**int llapi_hsm_action_begin(struct hsm_copyaction_private \*\***\ phcp\ **, -const struct hsm_copytool_private \***\ ct\ **, const struct -hsm_action_item \***\ hai\ **, int** restore_mdt_index\ **, int** -restore_open_flags\ **, bool** is_error\ **)** - -**int llapi_hsm_action_end(struct hsm_copyaction_private \*\***\ phcp\ **, -const struct hsm_extent \***\ he\ **, int** hp_flags\ **, int** errval\ **)** - -**int llapi_hsm_action_progress(struct hsm_copyaction_private \***\ hcp\ **, -const struct hsm_extent \***\ he\ **, __u64** total\ **, int** hp_flags\ **)** - -**int llapi_hsm_action_get_dfid(const struct hsm_copyaction_private \***\ hcp\ **, -lustre_fid \***\ fid\ **)** - -**int llapi_hsm_action_get_fd(const struct hsm_copyaction_private \***\ hcp\ **)** - - -DESCRIPTION -=========== - -When a copytool is ready to process an HSM action received through -**llapi_hsm_copytool_recv**\ (), it must first call -**llapi_hsm_action_begin**\ () to initialize the internal action -state, stored in *phcp*. *ct* is the opaque copytools handle -previously returned by **llapi_hsm_copytool_register**\ (). *hai* is -the request. *restore_mdt_index* and *restore_open_flags* are only -used for an **HSMA_RESTORE** type of request. *restore_mdt_index* is -the MDT index on which to create the restored file, or -1 for -default. If the copytool does not intend to process the request, it -should set *is_error* to **true**, and then call -**llapi_hsm_action_end**\ (). - -While performing a copy (i.e. the HSM request is either -**HSMA_ARCHIVE** or **HSMA_RESTORE**), the copytool can inform Lustre -of the progress of the operation with **llapi_hsm_action_progress**\ -(). *he* is the interval (*offset*, *length*) of the data copied. Each -interval must be unique; i.e. there must not be any overlap. *length* -is the total length that is expected to be transfered. *hp_flags* -should be 0. The progress can be checked on any Lustre client by -calling **llapi_hsm_current_action**\ (), or by using **lfs -hsm_action**. - -Once the HSM request has been performed, the destination file must be -closed, and **llapi_hsm_action_end**\ () must be called to free-up the -allocated ressources and signal Lustre that the file is now available -to consumers. *errval* is set to 0 on success. On error, it must be an -errno, and hp_flags can be set to **HP_FLAG_RETRY** if the request is -retryable, 0 otherwise. *he* is the interval (*offset*, *length*) of -the data copied. It can be the *hai_extent* of the HSM request. - -For a restore operation, a volatile file, invisible to ls, is -created. **llapi_hsm_action_get_fd**\ () will return a file descriptor -to it. It is the responsibility of the copytool to close the returned -file descriptor when the data transfer is -done. **llapi_hsm_action_get_dfid**\ () will return the FID of the volatile -file, which can then be used with **llapi_open_by_fid**\ () to open -the file in a different process, or on a different node. - -**llapi_hsm_action_get_fd**\ () and **llapi_hsm_action_get_dfid**\ () -can be called for an archive operation too. The returned file -descriptor and the FID are from the file to be archived. - - -RETURN VALUE -============ - -**llapi_hsm_action_get_fd**\ () returns a file descriptor on -success. The other functions return 0 on success. All functions return -a negative errno on failure. - - -ERRORS -====== - -The negative errno can be, but is not limited to: - -**-EINVAL** An invalid value was passed, the copytool is not - registered, ... - -**-ENOMEM** Not enough memory to allocate a resource. - - -SEE ALSO -======== - -**llapi_hsm_copytool_register**\ (3), **llapi_hsm_copytool_recv**\ (3), -**lustreapi**\ (7), **lfs**\ (1) - -See *lhsmtool_posix.c* in the Lustre sources for a use case of this -API. diff --git a/lustre/doc/llapi_hsm_copytool_register.3 b/lustre/doc/llapi_hsm_copytool_register.3 new file mode 100644 index 0000000..e4eaa0d --- /dev/null +++ b/lustre/doc/llapi_hsm_copytool_register.3 @@ -0,0 +1,154 @@ +. +.TH LLAPI_HSM_COPYTOOL_REGISTER 3 "2014-09-24" "" "Lustre HSM User API" +.SH NAME +llapi_hsm_copytool_register \- Lustre API copytool management +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.sp +\fB#include \fP +.sp +\fBint llapi_hsm_copytool_register(struct hsm_copytool_private **\fPpriv\fB, +const char *\fPmnt\fB, int\fP archive_count\fB, int *\fParchives\fB, +int\fP rfd_flags\fB)\fP +.sp +\fBint llapi_hsm_copytool_unregister(struct hsm_copytool_private **\fPpriv +\fB)\fP +.sp +\fBint llapi_hsm_copytool_get_fd(struct hsm_copytool_private *\fPct\fB)\fP +.sp +\fBint llapi_hsm_copytool_recv(struct hsm_copytool_private *\fPpriv\fB, +**struct hsm_action_list **\fPhal\fB, int *\fPmsgsize\fB)\fP +.sp +\fBstruct hsm_action_item *hai_first(struct hsm_action_list *\fPhal\fB)\fP +.sp +\fBstruct hsm_action_item *hai_next(struct hsm_action_item *\fPhai\fB)\fP +.SH DESCRIPTION +.sp +To receive HSM requests from a Lustre filesystem, a copytool +application must register with Lustre by calling +\fBllapi_hsm_copytool_register\fP(). The mountpoint of the Lustre +filesystem to monitor is indicated by \fImnt\fP\&. \fIarchives\fP is an array +with up to 32 elements indicating which archive IDs to register +for. Each element is a number from 1 to 32. \fIarchive_count\fP is the +number of valid elements in the \fIarchive\fP array. If an element in +\fIarchives\fP is 0, or if \fIarchive_count\fP is 0, then all archives will be +monitored. \fIrfd_flags\fP determines whether \fBllapi_hsm_copytool_recv\fP +will be blocking, with 0, or non\-blocking, with O_NONBLOCK. +.sp +\fBllapi_hsm_copytool_register\fP returns \fIpriv\fP, an opaque +pointer that must be used with the other functions. +.sp +\fBllapi_hsm_copytool_unregister\fP unregisters a copytool. \fIpriv\fP is +the opaque handle returned by \fBllapi_hsm_copytool_register\fP\&. +.sp +\fBllapi_hsm_copytool_get_fd\fP returns the file descriptor used by the +library to communicate with the kernel. This descriptor is only +intended to be used with \fBselect(2)\fP or \fBpoll(2)\fP\&. \fIrfd_flags\fP +should have been set to O_NONBLOCK. +.sp +To receive the requests, the application has to call +\fBllapi_hsm_copytool_recv\fP\&. When it returns 0, a message is available +in \fIhal\fP, and its size in bytes is returned in \fImsgsize\fP\&. \fIhal\fP points +to a buffer allocated by the Lustre library. It contains one or more +HSM requests. This buffer is valid until the next call to +\fBllapi_hsm_copytool_recv\fP\&. +.sp +\fIhal\fP is composed of a header of type \fIstruct hsm_action_list\fP +followed by one or several HSM requests of type \fIstruct +hsm_action_item\fP: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +struct hsm_action_list { + __u32 hal_version; + __u32 hal_count; /* number of hai\(aqs to follow */ + __u64 hal_compound_id; /* returned by coordinator */ + __u64 hal_flags; + __u32 hal_archive_id; /* which archive backend */ + __u32 padding1; + char hal_fsname[0]; /* null\-terminated name of filesystem */ +}; + +struct hsm_action_item { + __u32 hai_len; /* valid size of this struct */ + __u32 hai_action; /* hsm_copytool_action, but use known size */ + lustre_fid hai_fid; /* Lustre FID to operated on */ + lustre_fid hai_dfid; /* fid used for data access */ + struct hsm_extent hai_extent; /* byte range to operate on */ + __u64 hai_cookie; /* action cookie from coordinator */ + __u64 hai_gid; /* grouplock id */ + char hai_data[0]; /* variable length */ +}; +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +To iterate through the requests, use \fBhai_first\fP to get the first +request, then \fBhai_next\fP\&. +.SH RETURN VALUE +.sp +\fBllapi_hsm_copytool_register\fP and \fBllapi_hsm_copytool_unregister\fP +return 0 on success. On error, a negative errno is returned. +.INDENT 0.0 +.TP +.B \fBllapi_hsm_copytool_get_fd\fP returns the file descriptor associated +with the register copytool. On error, a negative errno is returned. +.UNINDENT +.sp +\fBllapi_hsm_copytool_recv\fP returns 0 when a message is available. If +the copytool was set to non\-blocking operation, \-EWOULDBLOCK is +immediately returned if no message is available. On error, a negative +errno is returned. +.SH ERRORS +.INDENT 0.0 +.TP +.B \fB\-EINVAL\fP An invalid value was passed, the copytool is not +registered, ... +.UNINDENT +.sp +\fB\-ESHUTDOWN\fP The transport endpoint shutdown. +.sp +\fB\-EPROTO\fP Lustre protocol error. +.sp +\fB\-EWOULDBLOCK\fP No HSM message is available, and the copytool was set +to not block on receives. +.SH SEE ALSO +.sp +\fBllapi_hsm_action_begin\fP(3), \fBllapi_hsm_action_end\fP(3), +\fBllapi_hsm_action_progress\fP(3), \fBllapi_hsm_action_get_dfid\fP(3), +\fBllapi_hsm_action_get_fd\fP(3), \fBlustreapi\fP(7) +.sp +See \fIlhsmtool_posix.c\fP in the Lustre sources for a use case of this +API. +.SH AUTHOR +Frank Zago +. diff --git a/lustre/doc/llapi_hsm_copytool_register.rst b/lustre/doc/llapi_hsm_copytool_register.rst deleted file mode 100644 index cc75566..0000000 --- a/lustre/doc/llapi_hsm_copytool_register.rst +++ /dev/null @@ -1,135 +0,0 @@ -=========================== -llapi_hsm_copytool_register -=========================== - ------------------------------- -Lustre API copytool management ------------------------------- - -:Author: Frank Zago -:Date: 2014-09-24 -:Manual section: 3 -:Manual group: Lustre HSM User API - - -SYNOPSIS -======== - -**#include ** - -**int llapi_hsm_copytool_register(struct hsm_copytool_private \*\***\ priv\ **, -const char \***\ mnt\ **, int** archive_count\ **, int \***\ archives\ **, -int** rfd_flags\ **)** - -**int llapi_hsm_copytool_unregister(struct hsm_copytool_private \*\***\ priv -**)** - -**int llapi_hsm_copytool_get_fd(struct hsm_copytool_private \***\ ct\ **)** - -**int llapi_hsm_copytool_recv(struct hsm_copytool_private \***\ priv\ **, -**struct hsm_action_list \*\***\ hal\ **, int \***\ msgsize\ **)** - -**struct hsm_action_item \*hai_first(struct hsm_action_list \***\ hal\ **)** - -**struct hsm_action_item \*hai_next(struct hsm_action_item \***\ hai\ **)** - - -DESCRIPTION -=========== - -To receive HSM requests from a Lustre filesystem, a copytool -application must register with Lustre by calling -**llapi_hsm_copytool_register**\ (). The mountpoint of the Lustre -filesystem to monitor is indicated by *mnt*. *archives* is an array -with up to 32 elements indicating which archive IDs to register -for. Each element is a number from 1 to 32. *archive_count* is the -number of valid elements in the *archive* array. If an element in -*archives* is 0, or if *archive_count* is 0, then all archives will be -monitored. *rfd_flags* determines whether **llapi_hsm_copytool_recv** -will be blocking, with 0, or non-blocking, with O_NONBLOCK. - -**llapi_hsm_copytool_register** returns *priv*, an opaque -pointer that must be used with the other functions. - -**llapi_hsm_copytool_unregister** unregisters a copytool. *priv* is -the opaque handle returned by **llapi_hsm_copytool_register**. - -**llapi_hsm_copytool_get_fd** returns the file descriptor used by the -library to communicate with the kernel. This descriptor is only -intended to be used with **select(2)** or **poll(2)**. *rfd_flags* -should have been set to O_NONBLOCK. - -To receive the requests, the application has to call -**llapi_hsm_copytool_recv**. When it returns 0, a message is available -in *hal*, and its size in bytes is returned in *msgsize*. *hal* points -to a buffer allocated by the Lustre library. It contains one or more -HSM requests. This buffer is valid until the next call to -**llapi_hsm_copytool_recv**. - -*hal* is composed of a header of type *struct hsm_action_list* -followed by one or several HSM requests of type *struct -hsm_action_item*:: - - struct hsm_action_list { - __u32 hal_version; - __u32 hal_count; /* number of hai's to follow */ - __u64 hal_compound_id; /* returned by coordinator */ - __u64 hal_flags; - __u32 hal_archive_id; /* which archive backend */ - __u32 padding1; - char hal_fsname[0]; /* null-terminated name of filesystem */ - }; - - struct hsm_action_item { - __u32 hai_len; /* valid size of this struct */ - __u32 hai_action; /* hsm_copytool_action, but use known size */ - lustre_fid hai_fid; /* Lustre FID to operated on */ - lustre_fid hai_dfid; /* fid used for data access */ - struct hsm_extent hai_extent; /* byte range to operate on */ - __u64 hai_cookie; /* action cookie from coordinator */ - __u64 hai_gid; /* grouplock id */ - char hai_data[0]; /* variable length */ - }; - -To iterate through the requests, use **hai_first** to get the first -request, then **hai_next**. - - -RETURN VALUE -============ - -**llapi_hsm_copytool_register** and **llapi_hsm_copytool_unregister** -return 0 on success. On error, a negative errno is returned. - -**llapi_hsm_copytool_get_fd** returns the file descriptor associated - with the register copytool. On error, a negative errno is returned. - -**llapi_hsm_copytool_recv** returns 0 when a message is available. If -the copytool was set to non-blocking operation, -EWOULDBLOCK is -immediately returned if no message is available. On error, a negative -errno is returned. - - -ERRORS -====== - -**-EINVAL** An invalid value was passed, the copytool is not - registered, ... - -**-ESHUTDOWN** The transport endpoint shutdown. - -**-EPROTO** Lustre protocol error. - -**-EWOULDBLOCK** No HSM message is available, and the copytool was set -to not block on receives. - - -SEE ALSO -======== - -**llapi_hsm_action_begin**\ (3), **llapi_hsm_action_end**\ (3), -**llapi_hsm_action_progress**\ (3), **llapi_hsm_action_get_dfid**\ (3), -**llapi_hsm_action_get_fd**\ (3), **lustreapi**\ (7) - -See *lhsmtool_posix.c* in the Lustre sources for a use case of this -API. diff --git a/lustre/doc/lustreapi.7 b/lustre/doc/lustreapi.7 new file mode 100644 index 0000000..c537853 --- /dev/null +++ b/lustre/doc/lustreapi.7 @@ -0,0 +1,63 @@ +. +.TH LUSTREAPI 7 "2014-09-21" "" "The Lustre API library" +.SH NAME +lustreapi \- The Lustre API library +. +.SH SYNOPSIS +.sp +\fB#include \fP +.SH DESCRIPTION +.sp +The lustreapi library provides functions to access and/or modify +settings specific to the Lustre filesystem (allocation policies, +quotas, etc). +.sp +The library provides the following functions: +.sp +.SH HSM FUNCTIONS +.sp +int llapi_hsm_copytool_register(struct hsm_copytool_private **priv, +const char *mnt, int archive_count, int *archives, +int rfd_flags) +.sp +int llapi_hsm_copytool_unregister(struct hsm_copytool_private **priv) +.sp +int llapi_hsm_copytool_get_fd(struct hsm_copytool_private *ct) +.sp +int llapi_hsm_copytool_recv(struct hsm_copytool_private *priv, +struct hsm_action_list **hal, int *msgsize) +.sp +struct hsm_action_item *hai_first(struct hsm_action_list *hal) +.sp +struct hsm_action_item *hai_next(struct hsm_action_item *hai) +.sp +int llapi_hsm_action_begin(struct hsm_copyaction_private **phcp, +const struct hsm_copytool_private *ct, const struct +hsm_action_item *hai, int restore_mdt_index, int +restore_open_flags, bool is_error) +.sp +int llapi_hsm_action_end(struct hsm_copyaction_private **phcp, +const struct hsm_extent *he, int hp_flags, int errval) +.sp +int llapi_hsm_action_progress(struct hsm_copyaction_private *hcp, +const struct hsm_extent *he, __u64 total, int hp_flags) +.sp +int llapi_hsm_action_get_dfid(const struct hsm_copyaction_private *hcp, +lustre_fid *fid) +.sp +int llapi_hsm_action_get_fd(const struct hsm_copyaction_private *hcp) +.SH SEE ALSO +.sp +\fBlustre\fP(7), +\fBllapi_file_create\fP(3), +\fBllapi_file_open\fP(3), +\fBllapi_file_get_stripe\fP(3), +\fBllapi_layout\fP(3), +\fBllapi_quotactl\fP(3), +\fBllapi_hsm_action_begin\fP(3), +\fBllapi_hsm_copytool_register\fP(3), +\fBllapi_hsm_state_get\fP(3), +\fBllapi_hsm_state_set\fP(3) +.SH AUTHOR +Lustre contributors +. diff --git a/lustre/doc/lustreapi.rst b/lustre/doc/lustreapi.rst deleted file mode 100644 index 331beb0..0000000 --- a/lustre/doc/lustreapi.rst +++ /dev/null @@ -1,72 +0,0 @@ -========= -lustreapi -========= - ----------------------- -The Lustre API library ----------------------- - -:Author: Lustre contributors -:Date: 2014-09-21 -:Manual section: 7 -:Manual group: The Lustre API library - -SYNOPSIS -======== - -**#include ** - -DESCRIPTION -=========== - -The lustreapi library provides functions to access and/or modify -settings specific to the Lustre filesystem (allocation policies, -quotas, etc). - -The library provides the following functions: - -**HSM** - - int llapi_hsm_copytool_register(struct hsm_copytool_private \*\*priv, - const char \*mnt, int archive_count, int \*archives, - int rfd_flags) - - int llapi_hsm_copytool_unregister(struct hsm_copytool_private \*\*priv) - - int llapi_hsm_copytool_get_fd(struct hsm_copytool_private \*ct) - - int llapi_hsm_copytool_recv(struct hsm_copytool_private \*priv, - struct hsm_action_list \*\*hal, int \*msgsize) - - struct hsm_action_item \*hai_first(struct hsm_action_list \*hal) - - struct hsm_action_item \*hai_next(struct hsm_action_item \*hai) - - int llapi_hsm_action_begin(struct hsm_copyaction_private \*\*phcp, - const struct hsm_copytool_private \*ct, const struct - hsm_action_item \*hai, int restore_mdt_index, int - restore_open_flags, bool is_error) - - int llapi_hsm_action_end(struct hsm_copyaction_private \*\*phcp, - const struct hsm_extent \*he, int hp_flags, int errval) - - int llapi_hsm_action_progress(struct hsm_copyaction_private \*hcp, - const struct hsm_extent \*he, __u64 total, int hp_flags) - - int llapi_hsm_action_get_dfid(const struct hsm_copyaction_private \*hcp, - lustre_fid \*fid) - - int llapi_hsm_action_get_fd(const struct hsm_copyaction_private \*hcp) - - -SEE ALSO -======== - -**lustre**\ (7), -**llapi_file_create**\ (3), -**llapi_file_open**\ (3), -**llapi_file_get_stripe**\ (3), -**llapi_layout**\ (3), -**llapi_quotactl**\ (3), -**llapi_hsm_state_get**\ (3), -**llapi_hsm_state_set**\ (3)