1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-29 13:49:30 +03:00

ctdb-protocol: Define a range of SRVIDs used by the ctdb tool

Get rid of the range reserved for traversals since it's not used.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs
2016-04-01 17:05:05 +11:00
committed by Martin Schwenke
parent 811192be34
commit 8142e108c7
2 changed files with 11 additions and 8 deletions

View File

@ -206,14 +206,17 @@ struct ctdb_call {
*/
#define CTDB_SRVID_ISCSID_RANGE 0xDE00000000000000LL
/* A range of ports reserved for testing (top 8 bits)
/* A range of ports reserved for CTDB tool (top 8 bits)
* All ports matching the 8 top bits are reserved for exclusive use by
* CTDB tool
*/
#define CTDB_SRVID_TOOL_RANGE 0xCE00000000000000LL
/* Range of ports reserved for test applications (top 8 bits)
* All ports matching the 8 top bits are reserved for exclusive use by
* test applications
*/
#define CTDB_SRVID_TEST_RANGE 0xCE00000000000000LL
/* Range of ports reserved for traversals */
#define CTDB_SRVID_TRAVERSE_RANGE 0xBE00000000000000LL
#define CTDB_SRVID_TEST_RANGE 0xBE00000000000000LL
enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0,

View File

@ -335,12 +335,12 @@ static void ctdb_srvid_print(uint64_t srvid, FILE *fp)
} else if ((srvid & prefix) == CTDB_SRVID_ISCSID_RANGE) {
srvid &= ~CTDB_SRVID_ISCSID_RANGE;
fprintf(fp, "iscsi-0x%"PRIx64"", srvid);
} else if ((srvid & prefix) == CTDB_SRVID_TOOL_RANGE) {
srvid &= ~CTDB_SRVID_TOOL_RANGE;
fprintf(fp, "tool-0x%"PRIx64"", srvid);
} else if ((srvid & prefix) == CTDB_SRVID_TEST_RANGE) {
srvid &= ~CTDB_SRVID_TEST_RANGE;
fprintf(fp, "test-0x%"PRIx64"", srvid);
} else if ((srvid & prefix) == CTDB_SRVID_TRAVERSE_RANGE) {
srvid &= ~CTDB_SRVID_TRAVERSE_RANGE;
fprintf(fp, "traverse-0x%"PRIx64"", srvid);
} else if ((srvid & prefix) == CTDB_SRVID_PID_RANGE) {
if (srvid < UINT16_MAX) {
fprintf(fp, "pid-%"PRIu64, srvid);