"Fossies" - the Fresh Open Source Software Archive

Member "glusterfs-8.2/glusterfsd/src/glusterfsd.h" (16 Sep 2020, 4449 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 "glusterfsd.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2    Copyright (c) 2006-2012 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 #ifndef __GLUSTERFSD_H__
   11 #define __GLUSTERFSD_H__
   12 
   13 #include "rpcsvc.h"
   14 #include "glusterd1-xdr.h"
   15 
   16 #define DEFAULT_GLUSTERD_VOLFILE CONFDIR "/glusterd.vol"
   17 #define DEFAULT_CLIENT_VOLFILE CONFDIR "/glusterfs.vol"
   18 #define DEFAULT_SERVER_VOLFILE CONFDIR "/glusterfsd.vol"
   19 
   20 #define DEFAULT_EVENT_POOL_SIZE 16384
   21 
   22 #define ARGP_LOG_LEVEL_NONE_OPTION "NONE"
   23 #define ARGP_LOG_LEVEL_TRACE_OPTION "TRACE"
   24 #define ARGP_LOG_LEVEL_CRITICAL_OPTION "CRITICAL"
   25 #define ARGP_LOG_LEVEL_ERROR_OPTION "ERROR"
   26 #define ARGP_LOG_LEVEL_WARNING_OPTION "WARNING"
   27 #define ARGP_LOG_LEVEL_INFO_OPTION "INFO"
   28 #define ARGP_LOG_LEVEL_DEBUG_OPTION "DEBUG"
   29 
   30 #define ENABLE_NO_DAEMON_MODE 1
   31 #define ENABLE_DEBUG_MODE 1
   32 
   33 #define GF_MEMPOOL_COUNT_OF_DICT_T 4096
   34 /* Considering 4 key/value pairs in a dictionary on an average */
   35 #define GF_MEMPOOL_COUNT_OF_DATA_T (GF_MEMPOOL_COUNT_OF_DICT_T * 4)
   36 #define GF_MEMPOOL_COUNT_OF_DATA_PAIR_T (GF_MEMPOOL_COUNT_OF_DICT_T * 4)
   37 
   38 #define GF_MEMPOOL_COUNT_OF_LRU_BUF_T 256
   39 
   40 enum argp_option_keys {
   41     ARGP_VOLFILE_SERVER_KEY = 's',
   42     ARGP_VOLUME_FILE_KEY = 'f',
   43     ARGP_LOG_LEVEL_KEY = 'L',
   44     ARGP_LOG_FILE_KEY = 'l',
   45     ARGP_VOLFILE_SERVER_PORT_KEY = 131,
   46     ARGP_VOLFILE_SERVER_TRANSPORT_KEY = 132,
   47     ARGP_PID_FILE_KEY = 'p',
   48     ARGP_SOCK_FILE_KEY = 'S',
   49     ARGP_NO_DAEMON_KEY = 'N',
   50     ARGP_RUN_ID_KEY = 'r',
   51     ARGP_PRINT_NETGROUPS = 'n',
   52     ARGP_PRINT_EXPORTS = 'e',
   53     ARGP_DEBUG_KEY = 133,
   54     ARGP_NEGATIVE_TIMEOUT_KEY = 134,
   55     ARGP_ENTRY_TIMEOUT_KEY = 135,
   56     ARGP_ATTRIBUTE_TIMEOUT_KEY = 136,
   57     ARGP_VOLUME_NAME_KEY = 137,
   58     ARGP_XLATOR_OPTION_KEY = 138,
   59     ARGP_DIRECT_IO_MODE_KEY = 139,
   60 #ifdef GF_DARWIN_HOST_OS
   61     ARGP_NON_LOCAL_KEY = 140,
   62 #endif /* DARWIN */
   63     ARGP_VOLFILE_ID_KEY = 143,
   64     ARGP_VOLFILE_CHECK_KEY = 144,
   65     ARGP_VOLFILE_MAX_FETCH_ATTEMPTS = 145,
   66     ARGP_LOG_SERVER_KEY = 146,
   67     ARGP_LOG_SERVER_PORT_KEY = 147,
   68     ARGP_READ_ONLY_KEY = 148,
   69     ARGP_MAC_COMPAT_KEY = 149,
   70     ARGP_DUMP_FUSE_KEY = 150,
   71     ARGP_BRICK_NAME_KEY = 151,
   72     ARGP_BRICK_PORT_KEY = 152,
   73     ARGP_CLIENT_PID_KEY = 153,
   74     ARGP_ACL_KEY = 154,
   75     ARGP_WORM_KEY = 155,
   76     ARGP_USER_MAP_ROOT_KEY = 156,
   77     ARGP_MEM_ACCOUNTING_KEY = 157,
   78     ARGP_SELINUX_KEY = 158,
   79     ARGP_FOPEN_KEEP_CACHE_KEY = 159,
   80     ARGP_GID_TIMEOUT_KEY = 160,
   81     ARGP_FUSE_BACKGROUND_QLEN_KEY = 161,
   82     ARGP_FUSE_CONGESTION_THRESHOLD_KEY = 162,
   83     ARGP_INODE32_KEY = 163,
   84     ARGP_FUSE_MOUNTOPTS_KEY = 164,
   85     ARGP_FUSE_USE_READDIRP_KEY = 165,
   86     ARGP_AUX_GFID_MOUNT_KEY = 166,
   87     ARGP_FUSE_NO_ROOT_SQUASH_KEY = 167,
   88     ARGP_LOGGER = 168,
   89     ARGP_LOG_FORMAT = 169,
   90     ARGP_LOG_BUF_SIZE = 170,
   91     ARGP_LOG_FLUSH_TIMEOUT = 171,
   92     ARGP_SECURE_MGMT_KEY = 172,
   93     ARGP_GLOBAL_TIMER_WHEEL = 173,
   94     ARGP_RESOLVE_GIDS_KEY = 174,
   95     ARGP_CAPABILITY_KEY = 175,
   96 #ifdef GF_LINUX_HOST_OS
   97     ARGP_OOM_SCORE_ADJ_KEY = 176,
   98 #endif
   99     ARGP_LOCALTIME_LOGGING_KEY = 177,
  100     ARGP_SUBDIR_MOUNT_KEY = 178,
  101     ARGP_PROCESS_NAME_KEY = 179,
  102     ARGP_FUSE_EVENT_HISTORY_KEY = 180,
  103     ARGP_THIN_CLIENT_KEY = 181,
  104     ARGP_READER_THREAD_COUNT_KEY = 182,
  105     ARGP_PRINT_XLATORDIR_KEY = 183,
  106     ARGP_PRINT_STATEDUMPDIR_KEY = 184,
  107     ARGP_PRINT_LOGDIR_KEY = 185,
  108     ARGP_KERNEL_WRITEBACK_CACHE_KEY = 186,
  109     ARGP_ATTR_TIMES_GRANULARITY_KEY = 187,
  110     ARGP_PRINT_LIBEXECDIR_KEY = 188,
  111     ARGP_FUSE_FLUSH_HANDLE_INTERRUPT_KEY = 189,
  112     ARGP_FUSE_LRU_LIMIT_KEY = 190,
  113     ARGP_FUSE_AUTO_INVAL_KEY = 191,
  114     ARGP_GLOBAL_THREADING_KEY = 192,
  115     ARGP_BRICK_MUX_KEY = 193,
  116     ARGP_FUSE_DEV_EPERM_RATELIMIT_NS_KEY = 194,
  117     ARGP_FUSE_INVALIDATE_LIMIT_KEY = 195,
  118 };
  119 
  120 struct _gfd_vol_top_priv {
  121     rpcsvc_request_t *req;
  122     gd1_mgmt_brick_op_req xlator_req;
  123     uint32_t blk_count;
  124     uint32_t blk_size;
  125     double throughput;
  126     double time;
  127     int32_t ret;
  128 };
  129 typedef struct _gfd_vol_top_priv gfd_vol_top_priv_t;
  130 
  131 int
  132 glusterfs_mgmt_pmap_signin(glusterfs_ctx_t *ctx);
  133 int
  134 glusterfs_volfile_fetch(glusterfs_ctx_t *ctx);
  135 void
  136 cleanup_and_exit(int signum);
  137 
  138 void
  139 xlator_mem_cleanup(xlator_t *this);
  140 
  141 extern glusterfs_ctx_t *glusterfsd_ctx;
  142 #endif /* __GLUSTERFSD_H__ */