ctdb-protocol: Define a range of SRVIDs used by the ctdb tool
authorAmitay Isaacs <amitay@gmail.com>
Fri, 1 Apr 2016 06:05:05 +0000 (17:05 +1100)
committerMartin Schwenke <martins@samba.org>
Sat, 23 Apr 2016 21:55:14 +0000 (23:55 +0200)
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>
ctdb/protocol/protocol.h
ctdb/protocol/protocol_debug.c

index 44267d34236734a8ca26bc23044b9f1de0a311f5..3ae2ff23db280c0918ffe9008a35986067658ede 100644 (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
- * 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,
index c54e014e2d5bcd2c3ed2666e6331de6421b02180..96c5ddec807221b8e197b14ed98b29943cd43c62 100644 (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);