summaryrefslogtreecommitdiffstats
path: root/doc/network_compression.md
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2014-04-02 11:36:20 +0530
committerAnand Avati <avati@redhat.com>2014-04-14 09:15:14 -0700
commita9d4d369efc978511e3cb69e5643945710cc9416 (patch)
tree19a8b0da0502de2d486470a921fc6dec45afc100 /doc/network_compression.md
parent09d2dcac3a238cfe6bde1a7aed06facfa16caf20 (diff)
dict: add dict_set_dynstr_with_alloc
There is an overwhelming no. of instances of the following pattern in glusterd module. ... char *dynstr = gf_strdup (str); if (!dynstr) goto err; ret = dict_set_dynstr (dict, key, dynstr); if (ret) goto err; ... With this changes it would look as below, ret = dict_set_dynstr_with_alloc (dict, key, str); if (ret) goto err; Change-Id: I6a47b1cbab4834badadc48c56d0b5c8c06c6dd4d Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/7379 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'doc/network_compression.md')
0 files changed, 0 insertions, 0 deletions
d='n111' href='#n111'>111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274
/*
  Copyright (c) 2015 Red Hat, Inc. <http://www.redhat.com>
  This file is part of GlusterFS.

  This file is licensed to you under your choice of the GNU Lesser
  General Public License, version 3 or any later version (LGPLv3 or
  later), or the GNU General Public License, version 2 (GPLv2), in all
  cases as published by the Free Software Foundation.
*/


#ifndef __SHARD_H__
#define __SHARD_H__

#include "xlator.h"
#include "compat-errno.h"
#include "shard-messages.h"

#define GF_SHARD_DIR ".shard"
#define SHARD_MIN_BLOCK_SIZE  (4 * GF_UNIT_MB)
#define SHARD_MAX_BLOCK_SIZE  (4 * GF_UNIT_TB)
#define SHARD_XATTR_PREFIX "trusted.glusterfs.shard."
#define GF_XATTR_SHARD_BLOCK_SIZE "trusted.glusterfs.shard.block-size"
#define GF_XATTR_SHARD_FILE_SIZE  "trusted.glusterfs.shard.file-size"
#define SHARD_ROOT_GFID "be318638-e8a0-4c6d-977d-7a937aa84806"
#define SHARD_INODE_LRU_LIMIT 4096
#define SHARD_MAX_INODES 16384
/**
 *  Bit masks for the valid flag, which is used while updating ctx
**/
#define SHARD_MASK_BLOCK_SIZE          (1 << 0)
#define SHARD_MASK_PROT                (1 << 1)
#define SHARD_MASK_NLINK               (1 << 2)
#define SHARD_MASK_UID                 (1 << 3)
#define SHARD_MASK_GID                 (1 << 4)
#define SHARD_MASK_SIZE                (1 << 6)
#define SHARD_MASK_BLOCKS              (1 << 7)
#define SHARD_MASK_TIMES               (1 << 8)
#define SHARD_MASK_OTHERS              (1 << 9)
#define SHARD_MASK_REFRESH_RESET       (1 << 10)

#define SHARD_INODE_WRITE_MASK (SHARD_MASK_SIZE | SHARD_MASK_BLOCKS         \
                                                | SHARD_MASK_TIMES)

#define SHARD_LOOKUP_MASK (SHARD_MASK_PROT | SHARD_MASK_NLINK | SHARD_MASK_UID \
                           | SHARD_MASK_GID | SHARD_MASK_TIMES                 \
                           | SHARD_MASK_OTHERS)

#define SHARD_ALL_MASK (SHARD_MASK_BLOCK_SIZE | SHARD_MASK_PROT               \
                        | SHARD_MASK_NLINK | SHARD_MASK_UID | SHARD_MASK_GID  \
                        | SHARD_MASK_SIZE | SHARD_MASK_BLOCKS                 \