votequorum: cleanup all man pages

sort and reference man pages in typical usage order

update some structures/defines

clean formatting to be consistent

don't ship qdevice API man pages for now

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Fabio M. Di Nitto 2012-02-13 10:56:08 +01:00
parent 48c81dd33b
commit cd036223ff
18 changed files with 208 additions and 134 deletions

View File

@ -83,10 +83,6 @@ autogen_man = cpg_context_get.3 \
votequorum_finalize.3 \
votequorum_getinfo.3 \
votequorum_initialize.3 \
votequorum_qdevice_getinfo.3 \
votequorum_qdevice_poll.3 \
votequorum_qdevice_register.3 \
votequorum_qdevice_unregister.3 \
votequorum_setexpected.3 \
votequorum_setvotes.3 \
votequorum_trackstart.3 \

View File

@ -276,19 +276,39 @@
<br>
<a href="votequorum_initialize.3.html">votequorum_initialize(3)</a>:
Description of the votequorum interface.
Description of the votequorum_initialize interface.
<br>
<a href="votequorum_finalize.3.html">votequorum_finalize(3)</a>:
Description of the votequorum interface.
<br>
<a href="votequorum_fd_get.3.html">votequorum_fd_get(3)</a>:
Description of the votequorum interface.
Description of the votequorum_finalize interface.
<br>
<a href="votequorum_getinfo.3.html">votequorum_getinfo(3)</a>:
Description of the votequorum interface.
Description of the votequorum_getinfo interface.
<br>
<a href="votequorum_trackstart.3.html">votequorum_trackstart(3)</a>:
Description of the votequorum_trackstart interface.
<br>
<a href="votequorum_trackstop.3.html">votequorum_trackstop(3)</a>:
Description of the votequorum_trackstop interface.
<br>
<a href="votequorum_fd_get.3.html">votequorum_fd_get(3)</a>:
Description of the votequorum_fd_get interface.
<br>
<a href="votequorum_dispatch.3.html">votequorum_dispatch(3)</a>:
Description of the votequorum_dispatch interface.
<br>
<a href="votequorum_context_set.3.html">votequorum_context_set(3)</a>:
Description of the votequorum_context_set interface.
<br>
<a href="votequorum_context_get.3.html">votequorum_context_get(3)</a>:
Description of the votequorum_context_get interface.
<br>
<a href="votequorum_setexpected.3.html">votequorum_setexpected(3)</a>:
@ -299,26 +319,6 @@
Description of the votequorum interface.
<br>
<a href="votequorum_qdevice_register.3.html">
votequorum_qdevice_register(3)</a>:
Description of the votequorum interface.
<br>
<a href="votequorum_qdevice_unregister.3.html">
votequorum_qdevice_unregister(3)</a>:
Description of the votequorum interface.
<br>
<a href="votequorum_qdevice_poll.3.html">
votequorum_qdevice_poll(3)</a>:
Description of the votequorum interface.
<br>
<a href="votequorum_qdevice_getinfo.3.html">
votequorum_qdevice_getinfo(3)</a>:
Description of the votequorum interface.
<br>
</p>
</body>

View File

@ -37,7 +37,7 @@ votequorum_context_get \- Gets the context variable for a VOTEQUORUM instance
.SH SYNOPSIS
.B #include <corosync/votequorum.h>
.sp
.BI "int votequorum_context_get(votequorum_handle_t " handle ", void **" context ");
.BI "int votequorum_context_get(votequorum_handle_t " handle ", void **" context ");"
.SH DESCRIPTION
The
.B votequorum_context_get
@ -49,10 +49,16 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.SH ERRORS
@COMMONIPCERRORS@
.SH "SEE ALSO"
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_get (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3)
.PP

View File

@ -37,7 +37,7 @@ votequorum_context_set \- Sets the context variable for a VOTEQUORUM instance
.SH SYNOPSIS
.B #include <corosync/votequorum.h>
.sp
.BI "int votequorum_context_set(votequorum_handle_t " handle ", void *" context ");
.BI "int votequorum_context_set(votequorum_handle_t " handle ", void *" context ");"
.SH DESCRIPTION
The
.B votequorum_context_set
@ -51,10 +51,16 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.SH ERRORS
@COMMONIPCERRORS@
.SH "SEE ALSO"
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_get (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3)
.PP

View File

@ -37,7 +37,7 @@ votequorum_dispatch \- Dispatches callbacks from the votequorum service
.SH SYNOPSIS
.B #include <corosync/votequorum.h>
.sp
.BI "int votequorum_dispatch(votequorum_handle_t " handle ", votequorum_dispatch_t *" dispatch_types ");"
.BI "int votequorum_dispatch(votequorum_handle_t " handle ", cs_dispatch_flags_t *" dispatch_types ");"
.SH DESCRIPTION
The
.B votequorum_dispatch
@ -53,21 +53,14 @@ The
argument is used to identify the type of dispatch to execute. The possible types are
defined by the structure:
.IP
.RS
.ne 18
.nf
.ta 4n 30n 33n
typedef enum {
CS_DISPATCH_ONE,
CS_DISPATCH_ALL,
CS_DISPATCH_BLOCKING
} votequorum_dispatch_t;
.ta
CS_DISPATCH_ONE = 1,
CS_DISPATCH_ALL = 2,
CS_DISPATCH_BLOCKING = 3,
CS_DISPATCH_ONE_NONBLOCKING = 4
} cs_dispatch_flags_t;
.fi
.RE
.IP
.PP
.PP
The dispatch values have the following meanings:
.TP
@ -79,7 +72,7 @@ Dispatch all waiting callbacks without blocking to wait for any callbacks.
.TP
.B CS_DISPATCH_BLOCKING
Dispatch all callbacks blocking indefinitely. This is used in a threaded
program where a thread is created, and then votequorum_dispatch() is called immediately
program where a thread is created, and then quorum_dispatch() is called immediately
from the created thread to execute callbacks.
.TP
.B CS_DISPATCH_ONE_NONBLOCKING
@ -95,6 +88,12 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3)
.PP

View File

@ -59,6 +59,12 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_dispatch (3),
.BR votequorum_fd_get (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3)
.PP

View File

@ -44,7 +44,8 @@ The
function is used to close a connection to the configuration dabatase API.
Once the connection is finalized, the handle may not be used again by applications.
No more callbacks will be dispatched from the
.B votequorum_dispatch function.
.B votequorum_dispatch
function.
.PP
.SH RETURN VALUE
This call returns the CS_OK value if successful, otherwise an error is returned.
@ -54,8 +55,13 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.SH "SEE ALSO"
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_dispatch (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3)
.PP

View File

@ -37,29 +37,24 @@ votequorum_getinfo \- Get information about the VoteQuorum service
.SH SYNOPSIS
.B #include <corosync/votequorum.h>
.sp
.BI "int votequorum_getinfo(votequorum_handle_t *" handle ", unsigned int " nodeid ", struct votequorum_info *" info ");
.BI "int votequorum_getinfo(votequorum_handle_t *" handle ", unsigned int " nodeid ", struct votequorum_info *" info ");"
.SH DESCRIPTION
The
.B votequorum_getinfo
function is used to get information about the voteing system and its nodes.
function is used to get information about the voting system and its nodes.
The votequorum_info structure is defined as follows:
.PP
.PP
.IP
.RS
.ne 18
.nf
.ta 4n 20n 32n
struct votequorum_info {
unsigned int node_id;
unsigned int node_votes;
unsigned int node_expected_votes;
unsigned int highest_expected;
unsigned int total_votes;
unsigned int quorum;
unsigned int flags;
unsigned int node_id;
unsigned int node_votes;
unsigned int node_expected_votes;
unsigned int highest_expected;
unsigned int total_votes;
unsigned int quorum;
unsigned int flags;
};
#define VOTEQUORUM_INFO_FLAG_TWONODE 1
@ -68,12 +63,7 @@ struct votequorum_info {
#define VOTEQUORUM_INFO_LAST_MAN_STANDING 8
#define VOTEQUORUM_INFO_AUTO_TIE_BREAKER 16
#define VOTEQUORUM_INFO_LEAVE_REMOVE 32
.ta
.fi
.RE
.IP
.PP
.PP
The members starting node_ hold information specific to the requested nodeid, the other are
general to the voting system.
@ -84,7 +74,14 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
@COMMONIPCERRORS@
.SH "SEE ALSO"
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3)
.PP

View File

@ -37,7 +37,7 @@ votequorum_initialize \- Create a new connection to the VoteQuorum service
.SH SYNOPSIS
.B #include <corosync/votequorum.h>
.sp
.BI "int votequorum_initialize(votequorum_handle_t *" handle ", votequorum_callbacks_t *" callbacks ");
.BI "int votequorum_initialize(votequorum_handle_t *" handle ", votequorum_callbacks_t *" callbacks ");"
.SH DESCRIPTION
The
.B votequorum_initialize
@ -54,6 +54,7 @@ for communication with the votequorum service.
Every time the voting configuraton changes (eg a node joins or leave the cluster), the callback is called.
The callback function is described by the following type definitions:
.nf
typedef void (*votequorum_notification_fn_t) (
votequorum_handle_t handle,
uint64_t context,
@ -62,28 +63,28 @@ typedef void (*votequorum_notification_fn_t) (
votequorum_node_t node_list[]
);
.ta
.fi
.RE
.IP
.PP
Every time the expected votes are changed, the callback is called.
The expected votes callback function is described by the following type definitions:
.nf
typedef void (*votequorum_expectedvotes_notification_fn_t) (
votequorum_handle_t handle,
uint64_t context,
uint32_t expected_votes);
.fi
.PP
The
.I callbacks
argument is of the type:
.IP
.RS
.ne 18
.nf
.PP
typedef struct {
votequorum_notification_fn_t votequorum_notify_fn;
votequorum_expectedvotes_notification_fn_t votequorum_expectedvotes_notify_fn;
} votequorum_callbacks_t;
.ta
.fi
.RE
.IP
.PP
When a configuration change occurs, the callback
is called from the
@ -97,6 +98,13 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.SH "SEE ALSO"
.BR votequorum_overview (8),
.BR votequorum_finalize (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3)
.PP

View File

@ -61,17 +61,15 @@ No known bugs at the time of writing. The authors are from outerspace. Deal with
.SH "SEE ALSO"
.BR corosync-quorumtool (8),
.BR votequorum (5),
.BR votequorum_context_get (3),
.BR votequorum_context_set (3),
.BR votequorum_dispatch (3),
.BR votequorum_fd_get (3),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_getinfo (3),
.BR votequorum_initialize (3),
.BR votequorum_qdevice_getinfo (3),
.BR votequorum_qdevice_poll (3),
.BR votequorum_qdevice_register (3),
.BR votequorum_qdevice_unregister (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3)
.PP

View File

@ -42,27 +42,14 @@ votequorum_qdevice_getinfo \- Get details of the quorum device
The
.B votequorum_qdevice_getinfo
Returns information about the quorum device in the following structure:
.PP
.PP
.IP
.RS
.ne 18
.nf
.ta 4n 20n 32n
struct votequorum_qdevice_info {
unsigned int votes;
unsigned int state;
char name[VOTEQUORUM_MAX_QDEVICE_NAME_LEN];
unsigned int votes;
unsigned int state;
char name[VOTEQUORUM_MAX_QDEVICE_NAME_LEN];
};
.ta
.fi
.RE
.IP
.PP
.PP
.SH RETURN VALUE
This call returns the CS_OK value if successful, otherwise an error is returned.
.PP
@ -72,9 +59,16 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_dispatch (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_qdevice_poll (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3),
.BR votequorum_qdevice_register (3),
.BR votequorum_qdevice_unregister (3),
.BR votequorum_qdevice_getinfo (3),
.BR votequorum_qdevice_poll (3)
.PP

View File

@ -42,7 +42,7 @@ votequorum_qdevice_poll \- Tells votequorum the result of the quorum device poll
The
.B votequorum_qdevice_poll
is called by the quorum device subsystem (not provided as part of votequorum) to tell
the voting system if the qurum device is present/active or not. If
the voting system if the quorum device is present/active or not. If
.B state
is 1 then the votes for the device are included in the quorum calculation, otherwise not.
This routine should be called at regular intervals to ensure that the device status
@ -61,9 +61,16 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_dispatch (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3),
.BR votequorum_qdevice_register (3),
.BR votequorum_qdevice_unregister (3),
.BR votequorum_qdevice_getinfo (3),
.BR votequorum_qdevice_get_info (3)
.PP

View File

@ -48,7 +48,7 @@ external device, usually a shared disk partition or perhaps a network router.
This call creates the device but does not mark it active.
.B votequorum_qdevice_poll
must be called for the votes to be included in the quorum calculation.
.br
.BR
Note that it is the responsibility of the quorum device subsystem (not provided as part of votequorum)
to keep all nodes informed of the quorum device status.
.SH RETURN VALUE
@ -60,9 +60,16 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_dispatch (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_qdevice_poll (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3),
.BR votequorum_qdevice_unregister (3),
.BR votequorum_qdevice_getinfo (3),
.BR votequorum_qdevice_poll (3),
.BR votequorum_qdevice_get_info (3)
.PP

View File

@ -41,7 +41,7 @@ votequorum_qdevice_unregister \- Unregisters a new quorum device
.SH DESCRIPTION
The
.B votequorum_qdevice_unregister
unregisters a quorum device. Any votes it had will be removed from the cluster. Not that this could
unregisters a quorum device. Any votes it had will be removed from the cluster. NOTE that this could
make the cluster inquorate.
.SH RETURN VALUE
This call returns the CS_OK value if successful, otherwise an error is returned.
@ -52,9 +52,16 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_dispatch (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_qdevice_poll (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3),
.BR votequorum_qdevice_register (3),
.BR votequorum_qdevice_getinfo (3),
.BR votequorum_qdevice_poll (3),
.BR votequorum_qdevice_get_info (3)
.PP

View File

@ -44,7 +44,7 @@ The
function is used to change the expected votes in the cluster. Expected votes is used to calculate
quorum and should normally be the total number of votes that will exist when all the expected nodes
are joined. Quorum will usually be half of this (rounded up).
.br
.BR
It is not possible to set expected votes up so that it makes the cluster inquorate using this command.
.SH RETURN VALUE
This call returns the CS_OK value if successful, otherwise an error is returned.
@ -55,6 +55,12 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_dispatch (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setvotes (3)
.PP

View File

@ -52,6 +52,12 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_dispatch (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3)
.PP

View File

@ -37,7 +37,7 @@ votequorum_trackstart \- Enable callbacks notification.
.SH SYNOPSIS
.B #include <corosync/votequorum.h>
.sp
.BI "int votequorum_trackstart(votequorum_handle_t *" handle ", uint64_t " context ", unsigned int " flags ");
.BI "int votequorum_trackstart(votequorum_handle_t *" handle ", uint64_t " context ", unsigned int " flags ");"
.SH DESCRIPTION
The
.B votequorum_trackstart
@ -50,15 +50,34 @@ The notification is dispatched via
.B votequorum_dispatch()
function that will execute the callback.
.PP
The
.I context
option allows to set a tracking context.
.PP
The
.I flags
argument is defined by one or more of the following values and values can be bitwise-or'd
.nf
#define CS_TRACK_CURRENT 0x01
#define CS_TRACK_CHANGES 0x02
#define CS_TRACK_CHANGES_ONLY 0x04
.fi
.SH RETURN VALUE
This call returns the CS_OK value if successful, otherwise an error is returned.
.PP
.SH ERRORS
@COMMONIPCERRORS@
.SH "SEE ALSO"
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstop (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_trackstop (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3)
.PP

View File

@ -37,7 +37,7 @@ votequorum_trackstop \- Disable callbacks notification.
.SH SYNOPSIS
.B #include <corosync/votequorum.h>
.sp
.BI "int votequorum_trackstart(votequorum_handle_t *" handle ");
.BI "int votequorum_trackstart(votequorum_handle_t *" handle ");"
.SH DESCRIPTION
The
.B votequorum_trackstop
@ -49,9 +49,15 @@ This call returns the CS_OK value if successful, otherwise an error is returned.
.SH ERRORS
@COMMONIPCERRORS@
.SH "SEE ALSO"
.BR votequorum_overview (8),
.BR votequorum_initialize (3),
.BR votequorum_finalize (3),
.BR votequorum_getinfo (3),
.BR votequorum_trackstart (3),
.BR votequorum_fd_get (3),
.BR votequorum_dispatch (3),
.BR votequorum_trackstart (3),
.BR votequorum_context_set (3),
.BR votequorum_context_get (3),
.BR votequorum_setexpected (3),
.BR votequorum_setvotes (3)
.PP