summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/decompounder/src/decompounder-messages.h24
-rw-r--r--xlators/performance/io-cache/src/io-cache-messages.h142
-rw-r--r--xlators/performance/io-threads/src/io-threads-messages.h96
-rw-r--r--xlators/performance/md-cache/src/md-cache-messages.h94
-rw-r--r--xlators/performance/nl-cache/src/nl-cache-messages.h31
-rw-r--r--xlators/performance/open-behind/src/open-behind-messages.h76
-rw-r--r--xlators/performance/quick-read/src/quick-read-messages.h132
-rw-r--r--xlators/performance/read-ahead/src/read-ahead-messages.h109
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead-messages.h100
-rw-r--r--xlators/performance/symlink-cache/src/symlink-cache-messages.h86
-rw-r--r--xlators/performance/write-behind/src/write-behind-messages.h116
11 files changed, 165 insertions, 841 deletions
diff --git a/xlators/performance/decompounder/src/decompounder-messages.h b/xlators/performance/decompounder/src/decompounder-messages.h
index 825599e9479..5f0aab4d92f 100644
--- a/xlators/performance/decompounder/src/decompounder-messages.h
+++ b/xlators/performance/decompounder/src/decompounder-messages.h
@@ -13,15 +13,19 @@
#include "glfs-message-id.h"
-#define GLFS_COMP_BASE_DC GLFS_MSGID_COMP_DC
-#define GLFS_NUM_MESSAGES 2
-#define GLFS_MSGID_END (GLFS_COMP_BASE_DC + GLFS_NUM_MESSAGES + 1)
+/* To add new message IDs, append new identifiers at the end of the list.
+ *
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
+ *
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
+ */
+
+GLFS_MSGID(DC,
+ DC_MSG_VOL_MISCONFIGURED,
+ DC_MSG_ERROR_RECEIVED
+);
-#define glfs_msg_start_x GLFS_COMP_BASE_DC, "Invalid: Start of messages"
-
-#define DC_MSG_VOL_MISCONFIGURED (GLFS_COMP_BASE_DC + 1)
-
-#define DC_MSG_ERROR_RECEIVED (GLFS_COMP_BASE_DC + 2)
-
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
#endif /* !_DC_MESSAGES_H_ */
diff --git a/xlators/performance/io-cache/src/io-cache-messages.h b/xlators/performance/io-cache/src/io-cache-messages.h
index ba6b55d1299..f49a977554b 100644
--- a/xlators/performance/io-cache/src/io-cache-messages.h
+++ b/xlators/performance/io-cache/src/io-cache-messages.h
@@ -12,126 +12,26 @@
#include "glfs-message-id.h"
-/*! \file io-cache-messages.h
- * \brief IO_CACHE log-message IDs and their descriptions
- *
- */
-
-/* NOTE: Rules for message additions
- * 1) Each instance of a message is _better_ left with a unique message ID, even
- * if the message format is the same. Reasoning is that, if the message
- * format needs to change in one instance, the other instances are not
- * impacted or the new change does not change the ID of the instance being
- * modified.
- * 2) Addition of a message,
- * - Should increment the GLFS_NUM_MESSAGES
- * - Append to the list of messages defined, towards the end
- * - Retain macro naming as glfs_msg_X (for redability across developers)
- * NOTE: Rules for message format modifications
- * 3) Check acorss the code if the message ID macro in question is reused
- * anywhere. If reused then then the modifications should ensure correctness
- * everywhere, or needs a new message ID as (1) above was not adhered to. If
- * not used anywhere, proceed with the required modification.
- * NOTE: Rules for message deletion
- * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
- * anywhere, then can be deleted, but will leave a hole by design, as
- * addition rules specify modification to the end of the list and not filling
- * holes.
- */
-
-#define GLFS_IO_CACHE_BASE GLFS_MSGID_COMP_IO_CACHE
-#define GLFS_IO_CACHE_NUM_MESSAGES 9
-#define GLFS_MSGID_END (GLFS_IO_CACHE_BASE + GLFS_IO_CACHE_NUM_MESSAGES + 1)
-
-/* Messages with message IDs */
-#define glfs_msg_start_x GLFS_IO_CACHE_BASE, "Invalid: Start of messages"
-
-
-
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_CACHE_MSG_ENFORCEMENT_FAILED (GLFS_IO_CACHE_BASE + 1)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_CACHE_MSG_INVALID_ARGUMENT (GLFS_IO_CACHE_BASE + 2)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_CACHE_MSG_XLATOR_CHILD_MISCONFIGURED (GLFS_IO_CACHE_BASE + 3)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_CACHE_MSG_NO_MEMORY (GLFS_IO_CACHE_BASE + 4)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_CACHE_MSG_VOL_MISCONFIGURED (GLFS_IO_CACHE_BASE + 5)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_CACHE_MSG_INODE_NULL (GLFS_IO_CACHE_BASE + 6)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_CACHE_MSG_PAGE_WAIT_VALIDATE (GLFS_IO_CACHE_BASE + 7)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_CACHE_MSG_STR_COVERSION_FAILED (GLFS_IO_CACHE_BASE + 8)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_CACHE_MSG_WASTED_COPY (GLFS_IO_CACHE_BASE + 9)
-
-/*------------*/
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
-
+/* To add new message IDs, append new identifiers at the end of the list.
+ *
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
+ *
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
+ */
+
+GLFS_MSGID(IO_CACHE,
+ IO_CACHE_MSG_ENFORCEMENT_FAILED,
+ IO_CACHE_MSG_INVALID_ARGUMENT,
+ IO_CACHE_MSG_XLATOR_CHILD_MISCONFIGURED,
+ IO_CACHE_MSG_NO_MEMORY,
+ IO_CACHE_MSG_VOL_MISCONFIGURED,
+ IO_CACHE_MSG_INODE_NULL,
+ IO_CACHE_MSG_PAGE_WAIT_VALIDATE,
+ IO_CACHE_MSG_STR_COVERSION_FAILED,
+ IO_CACHE_MSG_WASTED_COPY
+);
#endif /* _IO_CACHE_MESSAGES_H_ */
diff --git a/xlators/performance/io-threads/src/io-threads-messages.h b/xlators/performance/io-threads/src/io-threads-messages.h
index ab1f672756b..0f3fe707a36 100644
--- a/xlators/performance/io-threads/src/io-threads-messages.h
+++ b/xlators/performance/io-threads/src/io-threads-messages.h
@@ -12,92 +12,22 @@
#include "glfs-message-id.h"
-/*! \file io-threads-messages.h
- * \brief IO_THREADS log-message IDs and their descriptions
+/* To add new message IDs, append new identifiers at the end of the list.
*
- */
-
-/* NOTE: Rules for message additions
- * 1) Each instance of a message is _better_ left with a unique message ID, even
- * if the message format is the same. Reasoning is that, if the message
- * format needs to change in one instance, the other instances are not
- * impacted or the new change does not change the ID of the instance being
- * modified.
- * 2) Addition of a message,
- * - Should increment the GLFS_NUM_MESSAGES
- * - Append to the list of messages defined, towards the end
- * - Retain macro naming as glfs_msg_X (for redability across developers)
- * NOTE: Rules for message format modifications
- * 3) Check acorss the code if the message ID macro in question is reused
- * anywhere. If reused then then the modifications should ensure correctness
- * everywhere, or needs a new message ID as (1) above was not adhered to. If
- * not used anywhere, proceed with the required modification.
- * NOTE: Rules for message deletion
- * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
- * anywhere, then can be deleted, but will leave a hole by design, as
- * addition rules specify modification to the end of the list and not filling
- * holes.
- */
-
-#define GLFS_IO_THREADS_BASE GLFS_MSGID_COMP_IO_THREADS
-#define GLFS_IO_THREADS_NUM_MESSAGES 5
-#define GLFS_MSGID_END (GLFS_IO_THREADS_BASE + \
- GLFS_IO_THREADS_NUM_MESSAGES + 1)
-
-/* Messages with message IDs */
-#define glfs_msg_start_x GLFS_IO_THREADS_BASE, "Invalid: Start of messages"
-
-
-
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_THREADS_MSG_INIT_FAILED (GLFS_IO_THREADS_BASE + 1)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_THREADS_MSG_XLATOR_CHILD_MISCONFIGURED (GLFS_IO_THREADS_BASE + 2)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_THREADS_MSG_NO_MEMORY (GLFS_IO_THREADS_BASE + 3)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
*
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
*/
-#define IO_THREADS_MSG_VOL_MISCONFIGURED (GLFS_IO_THREADS_BASE + 4)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define IO_THREADS_MSG_SIZE_NOT_SET (GLFS_IO_THREADS_BASE + 5)
-
-
-/*------------*/
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
-
+GLFS_MSGID(IO_THREADS,
+ IO_THREADS_MSG_INIT_FAILED,
+ IO_THREADS_MSG_XLATOR_CHILD_MISCONFIGURED,
+ IO_THREADS_MSG_NO_MEMORY,
+ IO_THREADS_MSG_VOL_MISCONFIGURED,
+ IO_THREADS_MSG_SIZE_NOT_SET
+);
#endif /* _IO_THREADS_MESSAGES_H_ */
diff --git a/xlators/performance/md-cache/src/md-cache-messages.h b/xlators/performance/md-cache/src/md-cache-messages.h
index 4aea7cd0a9d..7aa6fc27824 100644
--- a/xlators/performance/md-cache/src/md-cache-messages.h
+++ b/xlators/performance/md-cache/src/md-cache-messages.h
@@ -12,90 +12,22 @@
#include "glfs-message-id.h"
-/*! \file md-cache-messages.h
- * \brief MD_CACHE log-message IDs and their descriptions
+/* To add new message IDs, append new identifiers at the end of the list.
*
- */
-
-/* NOTE: Rules for message additions
- * 1) Each instance of a message is _better_ left with a unique message ID, even
- * if the message format is the same. Reasoning is that, if the message
- * format needs to change in one instance, the other instances are not
- * impacted or the new change does not change the ID of the instance being
- * modified.
- * 2) Addition of a message,
- * - Should increment the GLFS_NUM_MESSAGES
- * - Append to the list of messages defined, towards the end
- * - Retain macro naming as glfs_msg_X (for redability across developers)
- * NOTE: Rules for message format modifications
- * 3) Check acorss the code if the message ID macro in question is reused
- * anywhere. If reused then then the modifications should ensure correctness
- * everywhere, or needs a new message ID as (1) above was not adhered to. If
- * not used anywhere, proceed with the required modification.
- * NOTE: Rules for message deletion
- * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
- * anywhere, then can be deleted, but will leave a hole by design, as
- * addition rules specify modification to the end of the list and not filling
- * holes.
- */
-
-#define GLFS_MD_CACHE_BASE GLFS_MSGID_COMP_MD_CACHE
-#define GLFS_MD_CACHE_NUM_MESSAGES 5
-#define GLFS_MSGID_END (GLFS_MD_CACHE_BASE + GLFS_MD_CACHE_NUM_MESSAGES + 1)
-
-/* Messages with message IDs */
-#define glfs_msg_start_x GLFS_MD_CACHE_BASE, "Invalid: Start of messages"
-
-
-
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
*
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
*/
-#define MD_CACHE_MSG_NO_MEMORY (GLFS_MD_CACHE_BASE + 1)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define MD_CACHE_MSG_DISCARD_UPDATE (GLFS_MD_CACHE_BASE + 2)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define MD_CACHE_MSG_CACHE_UPDATE (GLFS_MD_CACHE_BASE + 3)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define MD_CACHE_MSG_IPC_UPCALL_FAILED (GLFS_MD_CACHE_BASE + 4)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define MD_CACHE_MSG_NO_XATTR_CACHE (GLFS_MD_CACHE_BASE + 5)
-
-/*------------*/
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
-
+GLFS_MSGID(MD_CACHE,
+ MD_CACHE_MSG_NO_MEMORY,
+ MD_CACHE_MSG_DISCARD_UPDATE,
+ MD_CACHE_MSG_CACHE_UPDATE,
+ MD_CACHE_MSG_IPC_UPCALL_FAILED,
+ MD_CACHE_MSG_NO_XATTR_CACHE
+);
#endif /* _MD_CACHE_MESSAGES_H_ */
diff --git a/xlators/performance/nl-cache/src/nl-cache-messages.h b/xlators/performance/nl-cache/src/nl-cache-messages.h
index 2e3b89443c3..6afa98f691e 100644
--- a/xlators/performance/nl-cache/src/nl-cache-messages.h
+++ b/xlators/performance/nl-cache/src/nl-cache-messages.h
@@ -8,27 +8,26 @@
* cases as published by the Free Software Foundation.
*/
-
#ifndef __NL_CACHE_MESSAGES_H__
#define __NL_CACHE_MESSAGES_H__
+#include "glfs-message-id.h"
-#define GLFS_COMP_BASE_NLC GLFS_MSGID_COMP_NLC
-#define GLFS_NUM_MESSAGES 4
-#define GLFS_MSGID_END (GLFS_COMP_BASE_NLC + GLFS_NUM_MESSAGES + 1)
-
-#define glfs_msg_start_x GLFS_COMP_BASE_NLC, "Invalid: Start of messages"
-
-/*!
- * @messageid 110001
- * @diagnosis Out of Memory
- * @recommendedaction None
+/* To add new message IDs, append new identifiers at the end of the list.
+ *
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
+ *
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
*/
-#define NLC_MSG_NO_MEMORY (GLFS_COMP_BASE_NLC + 1)
-#define NLC_MSG_EINVAL (GLFS_COMP_BASE_NLC + 2)
-#define NLC_MSG_NO_TIMER_WHEEL (GLFS_COMP_BASE_NLC + 3)
-#define NLC_MSG_DICT_FAILURE (GLFS_COMP_BASE_NLC + 4)
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
+GLFS_MSGID(NLC,
+ NLC_MSG_NO_MEMORY,
+ NLC_MSG_EINVAL,
+ NLC_MSG_NO_TIMER_WHEEL,
+ NLC_MSG_DICT_FAILURE
+);
#endif /* __NL_CACHE_MESSAGES_H__ */
diff --git a/xlators/performance/open-behind/src/open-behind-messages.h b/xlators/performance/open-behind/src/open-behind-messages.h
index 57e63ea4bbb..9cb4cd5228f 100644
--- a/xlators/performance/open-behind/src/open-behind-messages.h
+++ b/xlators/performance/open-behind/src/open-behind-messages.h
@@ -12,74 +12,20 @@
#include "glfs-message-id.h"
-/*! \file open-behind-messages.h
- * \brief OPEN_BEHIND log-message IDs and their descriptions
+/* To add new message IDs, append new identifiers at the end of the list.
*
- */
-
-/* NOTE: Rules for message additions
- * 1) Each instance of a message is _better_ left with a unique message ID, even
- * if the message format is the same. Reasoning is that, if the message
- * format needs to change in one instance, the other instances are not
- * impacted or the new change does not change the ID of the instance being
- * modified.
- * 2) Addition of a message,
- * - Should increment the GLFS_NUM_MESSAGES
- * - Append to the list of messages defined, towards the end
- * - Retain macro naming as glfs_msg_X (for redability across developers)
- * NOTE: Rules for message format modifications
- * 3) Check acorss the code if the message ID macro in question is reused
- * anywhere. If reused then then the modifications should ensure correctness
- * everywhere, or needs a new message ID as (1) above was not adhered to. If
- * not used anywhere, proceed with the required modification.
- * NOTE: Rules for message deletion
- * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
- * anywhere, then can be deleted, but will leave a hole by design, as
- * addition rules specify modification to the end of the list and not filling
- * holes.
- */
-
-#define GLFS_OPEN_BEHIND_BASE GLFS_MSGID_COMP_OPEN_BEHIND
-#define GLFS_OPEN_BEHIND_NUM_MESSAGES 3
-#define GLFS_MSGID_END (GLFS_OPEN_BEHIND_BASE + \
- GLFS_OPEN_BEHIND_NUM_MESSAGES + 1)
-
-/* Messages with message IDs */
-#define glfs_msg_start_x GLFS_OPEN_BEHIND_BASE, "Invalid: Start of messages"
-
-
-
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define OPEN_BEHIND_MSG_XLATOR_CHILD_MISCONFIGURED (GLFS_OPEN_BEHIND_BASE + 1)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define OPEN_BEHIND_MSG_VOL_MISCONFIGURED (GLFS_OPEN_BEHIND_BASE + 2)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
*
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
*/
-#define OPEN_BEHIND_MSG_NO_MEMORY (GLFS_OPEN_BEHIND_BASE + 3)
-
-
-/*------------*/
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
-
+GLFS_MSGID(OPEN_BEHIND,
+ OPEN_BEHIND_MSG_XLATOR_CHILD_MISCONFIGURED,
+ OPEN_BEHIND_MSG_VOL_MISCONFIGURED,
+ OPEN_BEHIND_MSG_NO_MEMORY
+);
#endif /* _OPEN_BEHIND_MESSAGES_H_ */
diff --git a/xlators/performance/quick-read/src/quick-read-messages.h b/xlators/performance/quick-read/src/quick-read-messages.h
index a3bd594471f..5f55658a82d 100644
--- a/xlators/performance/quick-read/src/quick-read-messages.h
+++ b/xlators/performance/quick-read/src/quick-read-messages.h
@@ -12,117 +12,25 @@
#include "glfs-message-id.h"
-/*! \file quick-read-messages.h
- * \brief QUICK_READ log-message IDs and their descriptions
- *
- */
-
-/* NOTE: Rules for message additions
- * 1) Each instance of a message is _better_ left with a unique message ID, even
- * if the message format is the same. Reasoning is that, if the message
- * format needs to change in one instance, the other instances are not
- * impacted or the new change does not change the ID of the instance being
- * modified.
- * 2) Addition of a message,
- * - Should increment the GLFS_NUM_MESSAGES
- * - Append to the list of messages defined, towards the end
- * - Retain macro naming as glfs_msg_X (for redability across developers)
- * NOTE: Rules for message format modifications
- * 3) Check acorss the code if the message ID macro in question is reused
- * anywhere. If reused then then the modifications should ensure correctness
- * everywhere, or needs a new message ID as (1) above was not adhered to. If
- * not used anywhere, proceed with the required modification.
- * NOTE: Rules for message deletion
- * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
- * anywhere, then can be deleted, but will leave a hole by design, as
- * addition rules specify modification to the end of the list and not filling
- * holes.
- */
-
-#define GLFS_QUICK_READ_BASE GLFS_MSGID_COMP_QUICK_READ
-#define GLFS_QUICK_READ_NUM_MESSAGES 8
-#define GLFS_MSGID_END (GLFS_QUICK_READ_BASE +\
- GLFS_QUICK_READ_NUM_MESSAGES + 1)
-
-/* Messages with message IDs */
-#define glfs_msg_start_x GLFS_QUICK_READ_BASE, "Invalid: Start of messages"
-
-
-#define QUICK_READ_MSG_ENFORCEMENT_FAILED (GLFS_QUICK_READ_BASE + 1)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define QUICK_READ_MSG_INVALID_ARGUMENT (GLFS_QUICK_READ_BASE + 2)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define QUICK_READ_MSG_XLATOR_CHILD_MISCONFIGURED\
- (GLFS_QUICK_READ_BASE + 3)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define QUICK_READ_MSG_NO_MEMORY (GLFS_QUICK_READ_BASE + 4)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define QUICK_READ_MSG_VOL_MISCONFIGURED (GLFS_QUICK_READ_BASE + 5)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define QUICK_READ_MSG_DICT_SET_FAILED (GLFS_QUICK_READ_BASE + 6)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define QUICK_READ_MSG_INVALID_CONFIG (GLFS_QUICK_READ_BASE + 7)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define QUICK_READ_MSG_LRU_NOT_EMPTY (GLFS_QUICK_READ_BASE + 8)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-/*------------*/
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
-
+/* To add new message IDs, append new identifiers at the end of the list.
+ *
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
+ *
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
+ */
+
+GLFS_MSGID(QUICK_READ,
+ QUICK_READ_MSG_ENFORCEMENT_FAILED,
+ QUICK_READ_MSG_INVALID_ARGUMENT,
+ QUICK_READ_MSG_XLATOR_CHILD_MISCONFIGURED,
+ QUICK_READ_MSG_NO_MEMORY,
+ QUICK_READ_MSG_VOL_MISCONFIGURED,
+ QUICK_READ_MSG_DICT_SET_FAILED,
+ QUICK_READ_MSG_INVALID_CONFIG,
+ QUICK_READ_MSG_LRU_NOT_EMPTY
+);
#endif /* _QUICK_READ_MESSAGES_H_ */
diff --git a/xlators/performance/read-ahead/src/read-ahead-messages.h b/xlators/performance/read-ahead/src/read-ahead-messages.h
index e6eaab10777..b2e6a1bced7 100644
--- a/xlators/performance/read-ahead/src/read-ahead-messages.h
+++ b/xlators/performance/read-ahead/src/read-ahead-messages.h
@@ -12,100 +12,23 @@
#include "glfs-message-id.h"
-/*! \file read-ahead-messages.h
- * \brief READ_AHEAD log-message IDs and their descriptions
+/* To add new message IDs, append new identifiers at the end of the list.
*
- */
-
-/* NOTE: Rules for message additions
- * 1) Each instance of a message is _better_ left with a unique message ID, even
- * if the message format is the same. Reasoning is that, if the message
- * format needs to change in one instance, the other instances are not
- * impacted or the new change does not change the ID of the instance being
- * modified.
- * 2) Addition of a message,
- * - Should increment the GLFS_NUM_MESSAGES
- * - Append to the list of messages defined, towards the end
- * - Retain macro naming as glfs_msg_X (for redability across developers)
- * NOTE: Rules for message format modifications
- * 3) Check acorss the code if the message ID macro in question is reused
- * anywhere. If reused then then the modifications should ensure correctness
- * everywhere, or needs a new message ID as (1) above was not adhered to. If
- * not used anywhere, proceed with the required modification.
- * NOTE: Rules for message deletion
- * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
- * anywhere, then can be deleted, but will leave a hole by design, as
- * addition rules specify modification to the end of the list and not filling
- * holes.
- */
-
-#define GLFS_READ_AHEAD_BASE GLFS_MSGID_COMP_READ_AHEAD
-#define GLFS_READ_AHEAD_NUM_MESSAGES 6
-#define GLFS_MSGID_END (GLFS_READ_AHEAD_BASE +\
- GLFS_READ_AHEAD_NUM_MESSAGES + 1)
-
-/* Messages with message IDs */
-#define glfs_msg_start_x GLFS_READ_AHEAD_BASE, "Invalid: Start of messages"
-
-
-
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define READ_AHEAD_MSG_XLATOR_CHILD_MISCONFIGURED (GLFS_READ_AHEAD_BASE + 1)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define READ_AHEAD_MSG_VOL_MISCONFIGURED (GLFS_READ_AHEAD_BASE + 2)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
*
- */
-
-#define READ_AHEAD_MSG_NO_MEMORY (GLFS_READ_AHEAD_BASE + 3)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define READ_AHEAD_MSG_FD_CONTEXT_NOT_SET (GLFS_READ_AHEAD_BASE + 4)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define READ_AHEAD_MSG_UNDESTROYED_FILE_FOUND (GLFS_READ_AHEAD_BASE + 5)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define READ_AHEAD_MSG_XLATOR_CONF_NULL (GLFS_READ_AHEAD_BASE + 6)
-
-/*------------*/
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
-
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
+ */
+
+GLFS_MSGID(READ_AHEAD,
+ READ_AHEAD_MSG_XLATOR_CHILD_MISCONFIGURED,
+ READ_AHEAD_MSG_VOL_MISCONFIGURED,
+ READ_AHEAD_MSG_NO_MEMORY,
+ READ_AHEAD_MSG_FD_CONTEXT_NOT_SET,
+ READ_AHEAD_MSG_UNDESTROYED_FILE_FOUND,
+ READ_AHEAD_MSG_XLATOR_CONF_NULL
+);
#endif /* _READ_AHEAD_MESSAGES_H_ */
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead-messages.h b/xlators/performance/readdir-ahead/src/readdir-ahead-messages.h
index 0a21bac61f3..fdcebe21f69 100644
--- a/xlators/performance/readdir-ahead/src/readdir-ahead-messages.h
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead-messages.h
@@ -12,95 +12,23 @@
#include "glfs-message-id.h"
-/*! \file readdir-ahead-messages.h
- * \brief READDIR_AHEAD log-message IDs and their descriptions
+/* To add new message IDs, append new identifiers at the end of the list.
*
- */
-
-/* NOTE: Rules for message additions
- * 1) Each instance of a message is _better_ left with a unique message ID, even
- * if the message format is the same. Reasoning is that, if the message
- * format needs to change in one instance, the other instances are not
- * impacted or the new change does not change the ID of the instance being
- * modified.
- * 2) Addition of a message,
- * - Should increment the GLFS_NUM_MESSAGES
- * - Append to the list of messages defined, towards the end
- * - Retain macro naming as glfs_msg_X (for redability across developers)
- * NOTE: Rules for message format modifications
- * 3) Check acorss the code if the message ID macro in question is reused
- * anywhere. If reused then then the modifications should ensure correctness
- * everywhere, or needs a new message ID as (1) above was not adhered to. If
- * not used anywhere, proceed with the required modification.
- * NOTE: Rules for message deletion
- * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
- * anywhere, then can be deleted, but will leave a hole by design, as
- * addition rules specify modification to the end of the list and not filling
- * holes.
- */
-
-#define GLFS_READDIR_AHEAD_BASE GLFS_MSGID_COMP_READDIR_AHEAD
-#define GLFS_READDIR_AHEAD_NUM_MESSAGES 6
-#define GLFS_MSGID_END (GLFS_READDIR_AHEAD_BASE +\
- GLFS_READDIR_AHEAD_NUM_MESSAGES + 1)
-
-/* Messages with message IDs */
-#define glfs_msg_start_x GLFS_READDIR_AHEAD_BASE, "Invalid: Start of messages"
-
-
-
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define READDIR_AHEAD_MSG_XLATOR_CHILD_MISCONFIGURED\
- (GLFS_READDIR_AHEAD_BASE + 1)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define READDIR_AHEAD_MSG_VOL_MISCONFIGURED (GLFS_READDIR_AHEAD_BASE + 2)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define READDIR_AHEAD_MSG_NO_MEMORY (GLFS_READDIR_AHEAD_BASE + 3)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
*
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
*/
-#define READDIR_AHEAD_MSG_DIR_RELEASE_PENDING_STUB \
- (GLFS_READDIR_AHEAD_BASE + 4)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define READDIR_AHEAD_MSG_OUT_OF_SEQUENCE (GLFS_READDIR_AHEAD_BASE + 5)
-
-#define READDIR_AHEAD_MSG_DICT_OP_FAILED (GLFS_READDIR_AHEAD_BASE + 6)
-
-/*------------*/
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
-
+GLFS_MSGID(READDIR_AHEAD,
+ READDIR_AHEAD_MSG_XLATOR_CHILD_MISCONFIGURED,
+ READDIR_AHEAD_MSG_VOL_MISCONFIGURED,
+ READDIR_AHEAD_MSG_NO_MEMORY,
+ READDIR_AHEAD_MSG_DIR_RELEASE_PENDING_STUB,
+ READDIR_AHEAD_MSG_OUT_OF_SEQUENCE,
+ READDIR_AHEAD_MSG_DICT_OP_FAILED
+);
#endif /* _READDIR_AHEAD_MESSAGES_H_ */
diff --git a/xlators/performance/symlink-cache/src/symlink-cache-messages.h b/xlators/performance/symlink-cache/src/symlink-cache-messages.h
index 89ea118d6b3..46685b7695d 100644
--- a/xlators/performance/symlink-cache/src/symlink-cache-messages.h
+++ b/xlators/performance/symlink-cache/src/symlink-cache-messages.h
@@ -12,82 +12,22 @@
#include "glfs-message-id.h"
-/*! \file symlink_cache-messages.h
- * \brief SYMLINK_CACHE log-message IDs and their descriptions
+/* To add new message IDs, append new identifiers at the end of the list.
*
- */
-
-/* NOTE: Rules for message additions
- * 1) Each instance of a message is _better_ left with a unique message ID, even
- * if the message format is the same. Reasoning is that, if the message
- * format needs to change in one instance, the other instances are not
- * impacted or the new change does not change the ID of the instance being
- * modified.
- * 2) Addition of a message,
- * - Should increment the GLFS_NUM_MESSAGES
- * - Append to the list of messages defined, towards the end
- * - Retain macro naming as glfs_msg_X (for redability across developers)
- * NOTE: Rules for message format modifications
- * 3) Check acorss the code if the message ID macro in question is reused
- * anywhere. If reused then then the modifications should ensure correctness
- * everywhere, or needs a new message ID as (1) above was not adhered to. If
- * not used anywhere, proceed with the required modification.
- * NOTE: Rules for message deletion
- * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
- * anywhere, then can be deleted, but will leave a hole by design, as
- * addition rules specify modification to the end of the list and not filling
- * holes.
- */
-
-#define GLFS_SYMLINK_CACHE_BASE GLFS_MSGID_COMP_SYMLINK_CACHE
-#define GLFS_SYMLINK_CACHE_NUM_MESSAGES 5
-#define GLFS_MSGID_END (GLFS_SYMLINK_CACHE_BASE +\
- GLFS_SYMLINK_CACHE_NUM_MESSAGES + 1)
-
-/* Messages with message IDs */
-#define glfs_msg_start_x GLFS_SYMLINK_CACHE_BASE, "Invalid: Start of messages"
-
-#define SYMLINK_CACHE_MSG_XLATOR_CHILD_MISCONFIGURED\
- (GLFS_SYMLINK_CACHE_BASE + 1)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define SYMLINK_CACHE_MSG_VOL_MISCONFIGURED (GLFS_SYMLINK_CACHE_BASE + 2)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
*
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
*/
-#define SYMLINK_CACHE_MSG_NO_MEMORY (GLFS_SYMLINK_CACHE_BASE + 3)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define SYMLINK_CACHE_MSG_DICT_GET_FAILED (GLFS_SYMLINK_CACHE_BASE + 4)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define SYMLINK_CACHE_MSG_DICT_SET_FAILED (GLFS_SYMLINK_CACHE_BASE + 5)
-
-/*------------*/
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
-
+GLFS_MSGID(SYMLINK_CACHE,
+ SYMLINK_CACHE_MSG_XLATOR_CHILD_MISCONFIGURED,
+ SYMLINK_CACHE_MSG_VOL_MISCONFIGURED,
+ SYMLINK_CACHE_MSG_NO_MEMORY,
+ SYMLINK_CACHE_MSG_DICT_GET_FAILED,
+ SYMLINK_CACHE_MSG_DICT_SET_FAILED
+);
#endif /* _SYMLINK_CACHE_MESSAGES_H_ */
diff --git a/xlators/performance/write-behind/src/write-behind-messages.h b/xlators/performance/write-behind/src/write-behind-messages.h
index d0934cff5a4..cf16b0afc6e 100644
--- a/xlators/performance/write-behind/src/write-behind-messages.h
+++ b/xlators/performance/write-behind/src/write-behind-messages.h
@@ -12,110 +12,24 @@
#include "glfs-message-id.h"
-/*! \file write-behind-messages.h
- * \brief WRITE_BEHIND log-message IDs and their descriptions
+/* To add new message IDs, append new identifiers at the end of the list.
*
- */
-
-/* NOTE: Rules for message additions
- * 1) Each instance of a message is _better_ left with a unique message ID, even
- * if the message format is the same. Reasoning is that, if the message
- * format needs to change in one instance, the other instances are not
- * impacted or the new change does not change the ID of the instance being
- * modified.
- * 2) Addition of a message,
- * - Should increment the GLFS_NUM_MESSAGES
- * - Append to the list of messages defined, towards the end
- * - Retain macro naming as glfs_msg_X (for redability across developers)
- * NOTE: Rules for message format modifications
- * 3) Check acorss the code if the message ID macro in question is reused
- * anywhere. If reused then then the modifications should ensure correctness
- * everywhere, or needs a new message ID as (1) above was not adhered to. If
- * not used anywhere, proceed with the required modification.
- * NOTE: Rules for message deletion
- * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
- * anywhere, then can be deleted, but will leave a hole by design, as
- * addition rules specify modification to the end of the list and not filling
- * holes.
- */
-
-#define GLFS_WRITE_BEHIND_BASE GLFS_MSGID_COMP_WRITE_BEHIND
-#define GLFS_WRITE_BEHIND_NUM_MESSAGES 7
-#define GLFS_MSGID_END (GLFS_WRITE_BEHIND_BASE +\
- GLFS_WRITE_BEHIND_NUM_MESSAGES + 1)
-
-/* Messages with message IDs */
-#define glfs_msg_start_x GLFS_WRITE_BEHIND_BASE, "Invalid: Start of messages"
-
-
-
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define WRITE_BEHIND_MSG_EXCEEDED_MAX_SIZE (GLFS_WRITE_BEHIND_BASE + 1)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define WRITE_BEHIND_MSG_INIT_FAILED (GLFS_WRITE_BEHIND_BASE + 2)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define WRITE_BEHIND_MSG_INVALID_ARGUMENT (GLFS_WRITE_BEHIND_BASE + 3)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define WRITE_BEHIND_MSG_NO_MEMORY (GLFS_WRITE_BEHIND_BASE + 4)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define WRITE_BEHIND_MSG_SIZE_NOT_SET (GLFS_WRITE_BEHIND_BASE + 5)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
+ * Never remove a message ID. If it's not used anymore, you can rename it or
+ * leave it as it is, but not delete it. This is to prevent reutilization of
+ * IDs by other messages.
*
+ * The component name must match one of the entries defined in
+ * glfs-message-id.h.
*/
-#define WRITE_BEHIND_MSG_VOL_MISCONFIGURED (GLFS_WRITE_BEHIND_BASE + 6)
-
-/*!
- * @messageid
- * @diagnosis
- * @recommendedaction None
- *
- */
-
-#define WRITE_BEHIND_MSG_RES_UNAVAILABLE (GLFS_WRITE_BEHIND_BASE + 7)
-
-
-/*------------*/
-#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
-
+GLFS_MSGID(WRITE_BEHIND,
+ WRITE_BEHIND_MSG_EXCEEDED_MAX_SIZE,
+ WRITE_BEHIND_MSG_INIT_FAILED,
+ WRITE_BEHIND_MSG_INVALID_ARGUMENT,
+ WRITE_BEHIND_MSG_NO_MEMORY,
+ WRITE_BEHIND_MSG_SIZE_NOT_SET,
+ WRITE_BEHIND_MSG_VOL_MISCONFIGURED,
+ WRITE_BEHIND_MSG_RES_UNAVAILABLE
+);
#endif /* _WRITE_BEHIND_MESSAGES_H_ */