"Fossies" - the Fresh Open Source Software Archive

Member "glusterfs-8.2/xlators/features/sdfs/src/sdfs-messages.h" (16 Sep 2020, 2364 Bytes) of package /linux/misc/glusterfs-8.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "sdfs-messages.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com>
    3  This file is part of GlusterFS.
    4 
    5  This file is licensed to you under your choice of the GNU Lesser
    6  General Public License, version 3 or any later version (LGPLv3 or
    7  later), or the GNU General Public License, version 2 (GPLv2), in all
    8  cases as published by the Free Software Foundation.
    9  */
   10 
   11 #ifndef _DFS_MESSAGES_H_
   12 #define _DFS_MESSAGES_H_
   13 
   14 #include <glusterfs/glfs-message-id.h>
   15 
   16 /* file bit-rot-bitd-messages.h
   17  * brief SDFS log-message IDs and their descriptions
   18  */
   19 
   20 /* NOTE: Rules for message additions
   21  * 1) Each instance of a message is _better_ left with a unique message ID, even
   22  *    if the message format is the same. Reasoning is that, if the message
   23  *    format needs to change in one instance, the other instances are not
   24  *    impacted or the new change does not change the ID of the instance being
   25  *    modified.
   26  * 2) Addition of a message,
   27  *       - Should increment the GLFS_NUM_MESSAGES
   28  *       - Append to the list of messages defined, towards the end
   29  *       - Retain macro naming as glfs_msg_X (for redability across developers)
   30  * NOTE: Rules for message format modifications
   31  * 3) Check acorss the code if the message ID macro in question is reused
   32  *    anywhere. If reused then then the modifications should ensure correctness
   33  *    everywhere, or needs a new message ID as (1) above was not adhered to. If
   34  *    not used anywhere, proceed with the required modification.
   35  * NOTE: Rules for message deletion
   36  * 4) Check (3) and if used anywhere else, then cannot be deleted. If not used
   37  *    anywhere, then can be deleted, but will leave a hole by design, as
   38  *    addition rules specify modification to the end of the list and not filling
   39  *    holes.
   40  */
   41 
   42 #define GLFS_SDFS_BASE GLFS_MSGID_COMP_SDFS
   43 #define GLFS_SDFS_NUM_MESSAGES 2
   44 #define GLFS_MSGID_END (GLFS_SDFS_BASE + GLFS_SDFS_NUM_MESSAGES + 1)
   45 /* Messaged with message IDs */
   46 #define glfs_msg_start_x GLFS_DFS_BASE, "Invalid: Start of messages"
   47 /*------------*/
   48 
   49 #define SDFS_MSG_ENTRYLK_ERROR (GLFS_SDFS_BASE + 1)
   50 /*!
   51  * @messageid
   52  * @diagnosis
   53  * @recommendedaction
   54  *
   55  */
   56 
   57 #define SDFS_MSG_MKDIR_ERROR (GLFS_SDFS_BASE + 2)
   58 /*!
   59  * @messageid
   60  * @diagnosis
   61  * @recommendedaction
   62  *
   63  */
   64 /*------------*/
   65 
   66 #define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
   67 #endif /* !_SDFS_MESSAGES_H_ */