From: Amitay Isaacs Date: Fri, 1 Apr 2016 06:05:05 +0000 (+1100) Subject: ctdb-protocol: Define a range of SRVIDs used by the ctdb tool X-Git-Tag: talloc-2.1.7~208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8142e108c746278d02583328ebe900fbd975f608;p=thirdparty%2Fsamba.git 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 Reviewed-by: Martin Schwenke --- diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h index 44267d34236..3ae2ff23db2 100644 --- a/ctdb/protocol/protocol.h +++ b/ctdb/protocol/protocol.h @@ -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 - * test applications + * CTDB tool */ -#define CTDB_SRVID_TEST_RANGE 0xCE00000000000000LL +#define CTDB_SRVID_TOOL_RANGE 0xCE00000000000000LL -/* Range of ports reserved for traversals */ -#define CTDB_SRVID_TRAVERSE_RANGE 0xBE00000000000000LL +/* 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 0xBE00000000000000LL enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0, diff --git a/ctdb/protocol/protocol_debug.c b/ctdb/protocol/protocol_debug.c index c54e014e2d5..96c5ddec807 100644 --- a/ctdb/protocol/protocol_debug.c +++ b/ctdb/protocol/protocol_debug.c @@ -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);