"Fossies" - the Fresh Open Source Software Archive

Member "glusterfs-8.2/xlators/cluster/ec/src/ec-types.h" (16 Sep 2020, 18808 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 "ec-types.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 8.0_vs_8.1.

    1 /*
    2   Copyright (c) 2015 DataLab, s.l. <http://www.datalab.es>
    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 __EC_TYPES_H__
   12 #define __EC_TYPES_H__
   13 
   14 #include <glusterfs/xlator.h>
   15 #include <glusterfs/timer.h>
   16 #include "libxlator.h"
   17 #include <glusterfs/atomic.h>
   18 
   19 #define EC_GF_MAX_REGS 16
   20 
   21 enum _ec_heal_need;
   22 typedef enum _ec_heal_need ec_heal_need_t;
   23 
   24 enum _ec_stripe_part;
   25 typedef enum _ec_stripe_part ec_stripe_part_t;
   26 
   27 enum _ec_read_policy;
   28 typedef enum _ec_read_policy ec_read_policy_t;
   29 
   30 struct _ec_config;
   31 typedef struct _ec_config ec_config_t;
   32 
   33 struct _ec_fd;
   34 typedef struct _ec_fd ec_fd_t;
   35 
   36 struct _ec_fragment_range;
   37 typedef struct _ec_fragment_range ec_fragment_range_t;
   38 
   39 struct _ec_inode;
   40 typedef struct _ec_inode ec_inode_t;
   41 
   42 union _ec_cbk;
   43 typedef union _ec_cbk ec_cbk_t;
   44 
   45 struct _ec_lock;
   46 typedef struct _ec_lock ec_lock_t;
   47 
   48 struct _ec_lock_link;
   49 typedef struct _ec_lock_link ec_lock_link_t;
   50 
   51 struct _ec_fop_data;
   52 typedef struct _ec_fop_data ec_fop_data_t;
   53 
   54 struct _ec_cbk_data;
   55 typedef struct _ec_cbk_data ec_cbk_data_t;
   56 
   57 enum _ec_gf_opcode;
   58 typedef enum _ec_gf_opcode ec_gf_opcode_t;
   59 
   60 struct _ec_gf_op;
   61 typedef struct _ec_gf_op ec_gf_op_t;
   62 
   63 struct _ec_gf_mul;
   64 typedef struct _ec_gf_mul ec_gf_mul_t;
   65 
   66 struct _ec_gf;
   67 typedef struct _ec_gf ec_gf_t;
   68 
   69 struct _ec_code_gen;
   70 typedef struct _ec_code_gen ec_code_gen_t;
   71 
   72 struct _ec_code;
   73 typedef struct _ec_code ec_code_t;
   74 
   75 struct _ec_code_arg;
   76 typedef struct _ec_code_arg ec_code_arg_t;
   77 
   78 struct _ec_code_op;
   79 typedef struct _ec_code_op ec_code_op_t;
   80 
   81 struct _ec_code_builder;
   82 typedef struct _ec_code_builder ec_code_builder_t;
   83 
   84 struct _ec_code_chunk;
   85 typedef struct _ec_code_chunk ec_code_chunk_t;
   86 
   87 struct _ec_stripe;
   88 typedef struct _ec_stripe ec_stripe_t;
   89 
   90 struct _ec_stripe_list;
   91 typedef struct _ec_stripe_list ec_stripe_list_t;
   92 
   93 struct _ec_code_space;
   94 typedef struct _ec_code_space ec_code_space_t;
   95 
   96 typedef void (*ec_code_func_linear_t)(void *dst, void *src, uint64_t offset,
   97                                       uint32_t *values, uint32_t count);
   98 
   99 typedef void (*ec_code_func_interleaved_t)(void *dst, void **src,
  100                                            uint64_t offset, uint32_t *values,
  101                                            uint32_t count);
  102 
  103 union _ec_code_func;
  104 typedef union _ec_code_func ec_code_func_t;
  105 
  106 struct _ec_matrix_row;
  107 typedef struct _ec_matrix_row ec_matrix_row_t;
  108 
  109 struct _ec_matrix;
  110 typedef struct _ec_matrix ec_matrix_t;
  111 
  112 struct _ec_matrix_list;
  113 typedef struct _ec_matrix_list ec_matrix_list_t;
  114 
  115 struct _ec_heal;
  116 typedef struct _ec_heal ec_heal_t;
  117 
  118 struct _ec_self_heald;
  119 typedef struct _ec_self_heald ec_self_heald_t;
  120 
  121 struct _ec_statistics;
  122 typedef struct _ec_statistics ec_statistics_t;
  123 
  124 struct _ec;
  125 typedef struct _ec ec_t;
  126 
  127 typedef void (*ec_wind_f)(ec_t *, ec_fop_data_t *, int32_t);
  128 typedef int32_t (*ec_handler_f)(ec_fop_data_t *, int32_t);
  129 typedef void (*ec_resume_f)(ec_fop_data_t *, int32_t);
  130 
  131 enum _ec_read_policy { EC_ROUND_ROBIN, EC_GFID_HASH, EC_READ_POLICY_MAX };
  132 
  133 enum _ec_heal_need {
  134     EC_HEAL_NONEED,
  135     EC_HEAL_MAYBE,
  136     EC_HEAL_MUST,
  137     EC_HEAL_PURGE_INDEX
  138 };
  139 
  140 enum _ec_stripe_part { EC_STRIPE_HEAD, EC_STRIPE_TAIL };
  141 
  142 /* Enumartions to indicate FD status. */
  143 typedef enum { EC_FD_NOT_OPENED, EC_FD_OPENED, EC_FD_OPENING } ec_fd_status_t;
  144 
  145 struct _ec_config {
  146     uint32_t version;
  147     uint8_t algorithm;
  148     uint8_t gf_word_size;
  149     uint8_t bricks;
  150     uint8_t redundancy;
  151     uint32_t chunk_size;
  152 };
  153 
  154 struct _ec_fd {
  155     loc_t loc;
  156     uintptr_t open;
  157     int32_t flags;
  158     uint64_t bad_version;
  159     ec_fd_status_t fd_status[0];
  160 };
  161 
  162 struct _ec_stripe {
  163     struct list_head lru; /* LRU list member */
  164     uint64_t frag_offset; /* Fragment offset of this stripe */
  165     char data[];          /* Contents of the stripe */
  166 };
  167 
  168 struct _ec_stripe_list {
  169     struct list_head lru;
  170     uint32_t count;
  171     uint32_t max;
  172 };
  173 
  174 struct _ec_inode {
  175     ec_lock_t *inode_lock;
  176     gf_boolean_t have_info;
  177     gf_boolean_t have_config;
  178     gf_boolean_t have_version;
  179     gf_boolean_t have_size;
  180     int32_t heal_count;
  181     ec_config_t config;
  182     uint64_t pre_version[2];
  183     uint64_t post_version[2];
  184     uint64_t pre_size;
  185     uint64_t post_size;
  186     uint64_t dirty[2];
  187     struct list_head heal;
  188     ec_stripe_list_t stripe_cache;
  189     uint64_t bad_version;
  190 };
  191 
  192 typedef int32_t (*fop_heal_cbk_t)(call_frame_t *, void *, xlator_t *, int32_t,
  193                                   int32_t, uintptr_t, uintptr_t, uintptr_t,
  194                                   uint32_t, dict_t *);
  195 typedef int32_t (*fop_fheal_cbk_t)(call_frame_t *, void *, xlator_t *, int32_t,
  196                                    int32_t, uintptr_t, uintptr_t, uintptr_t,
  197                                    uint32_t, dict_t *);
  198 
  199 union _ec_cbk {
  200     fop_access_cbk_t access;
  201     fop_create_cbk_t create;
  202     fop_discard_cbk_t discard;
  203     fop_entrylk_cbk_t entrylk;
  204     fop_fentrylk_cbk_t fentrylk;
  205     fop_fallocate_cbk_t fallocate;
  206     fop_flush_cbk_t flush;
  207     fop_fsync_cbk_t fsync;
  208     fop_fsyncdir_cbk_t fsyncdir;
  209     fop_getxattr_cbk_t getxattr;
  210     fop_fgetxattr_cbk_t fgetxattr;
  211     fop_heal_cbk_t heal;
  212     fop_fheal_cbk_t fheal;
  213     fop_inodelk_cbk_t inodelk;
  214     fop_finodelk_cbk_t finodelk;
  215     fop_link_cbk_t link;
  216     fop_lk_cbk_t lk;
  217     fop_lookup_cbk_t lookup;
  218     fop_mkdir_cbk_t mkdir;
  219     fop_mknod_cbk_t mknod;
  220     fop_open_cbk_t open;
  221     fop_opendir_cbk_t opendir;
  222     fop_readdir_cbk_t readdir;
  223     fop_readdirp_cbk_t readdirp;
  224     fop_readlink_cbk_t readlink;
  225     fop_readv_cbk_t readv;
  226     fop_removexattr_cbk_t removexattr;
  227     fop_fremovexattr_cbk_t fremovexattr;
  228     fop_rename_cbk_t rename;
  229     fop_rmdir_cbk_t rmdir;
  230     fop_setattr_cbk_t setattr;
  231     fop_fsetattr_cbk_t fsetattr;
  232     fop_setxattr_cbk_t setxattr;
  233     fop_fsetxattr_cbk_t fsetxattr;
  234     fop_stat_cbk_t stat;
  235     fop_fstat_cbk_t fstat;
  236     fop_statfs_cbk_t statfs;
  237     fop_symlink_cbk_t symlink;
  238     fop_truncate_cbk_t truncate;
  239     fop_ftruncate_cbk_t ftruncate;
  240     fop_unlink_cbk_t unlink;
  241     fop_writev_cbk_t writev;
  242     fop_xattrop_cbk_t xattrop;
  243     fop_fxattrop_cbk_t fxattrop;
  244     fop_zerofill_cbk_t zerofill;
  245     fop_seek_cbk_t seek;
  246     fop_ipc_cbk_t ipc;
  247 };
  248 
  249 struct _ec_lock {
  250     ec_inode_t *ctx;
  251     gf_timer_t *timer;
  252 
  253     /* List of owners of this lock. All fops added to this list are running
  254      * concurrently. */
  255     struct list_head owners;
  256 
  257     /* List of fops waiting to be an owner of the lock. Fops are added to this
  258      * list when the current owner has an incompatible access (conflicting lock)
  259      * or the lock is not acquired yet. */
  260     struct list_head waiting;
  261 
  262     /* List of fops that will wait until the next unlock/lock cycle. This
  263      * happens when the currently acquired lock is decided to be released as
  264      * soon as possible. In this case, all frozen fops will be continued only
  265      * after the lock is reacquired. */
  266     struct list_head frozen;
  267 
  268     uintptr_t mask;
  269     uintptr_t good_mask;
  270     uintptr_t healing;
  271     uint32_t refs_owners;   /* Refs for fops owning the lock */
  272     uint32_t refs_pending;  /* Refs assigned to fops being prepared */
  273     uint32_t waiting_flags; /*Track xattrop/dirty marking*/
  274     gf_boolean_t acquired;
  275     gf_boolean_t contention;
  276     gf_boolean_t unlock_now;
  277     gf_boolean_t release;
  278     gf_boolean_t query;
  279     fd_t *fd;
  280     loc_t loc;
  281     union {
  282         entrylk_type type;
  283         struct gf_flock flock;
  284     };
  285 };
  286 
  287 struct _ec_lock_link {
  288     ec_lock_t *lock;
  289     ec_fop_data_t *fop;
  290     struct list_head owner_list;
  291     struct list_head wait_list;
  292     gf_boolean_t update[2];
  293     gf_boolean_t dirty[2];
  294     gf_boolean_t optimistic_changelog;
  295     loc_t *base;
  296     uint64_t size;
  297     uint32_t waiting_flags;
  298     off_t fl_start;
  299     off_t fl_end;
  300 };
  301 
  302 /* This structure keeps a range of fragment offsets affected by a fop. Since
  303  * real file offsets can be difficult to handle correctly because of overflows,
  304  * we use the 'scaled' offset, which corresponds to the offset of the fragment
  305  * seen by the bricks, which is always smaller and cannot overflow. */
  306 struct _ec_fragment_range {
  307     uint64_t first; /* Address of the first affected fragment as seen by the
  308                        bricks (offset on brick) */
  309     uint64_t last;  /* Address of the first non affected fragment as seen by
  310                        the bricks (offset on brick) */
  311 };
  312 
  313 /* EC xlator data structure to collect all the data required to perform
  314  * the file operation.*/
  315 struct _ec_fop_data {
  316     int32_t id; /* ID of the file operation */
  317     int32_t refs;
  318     int32_t state;
  319     uint32_t minimum; /* Minimum number of successful
  320                          operation required to conclude a
  321                          fop as successful */
  322     int32_t expected;
  323     int32_t winds;
  324     int32_t jobs;
  325     int32_t error;
  326     ec_fop_data_t *parent;
  327     xlator_t *xl;                  /* points to EC xlator */
  328     call_frame_t *req_frame;       /* frame of the calling xlator */
  329     call_frame_t *frame;           /* frame used by this fop */
  330     struct list_head cbk_list;     /* sorted list of groups of answers */
  331     struct list_head answer_list;  /* list of answers */
  332     struct list_head pending_list; /* member of ec_t.pending_fops */
  333     ec_cbk_data_t *answer;         /* accepted answer */
  334     int32_t lock_count;
  335     int32_t locked;
  336     gf_lock_t lock;
  337     ec_lock_link_t locks[2];
  338     int32_t first_lock;
  339 
  340     uint32_t fop_flags; /* Flags passed by the caller. */
  341     uint32_t flags;     /* Internal flags. */
  342     uint32_t first;
  343     uintptr_t mask;
  344     uintptr_t healing; /*Dispatch is done but call is successful only
  345                          if fop->minimum number of subvolumes succeed
  346                          which are not healing*/
  347     uintptr_t remaining;
  348     uintptr_t received; /* Mask of responses */
  349     uintptr_t good;
  350 
  351     uid_t uid;
  352     gid_t gid;
  353 
  354     ec_wind_f wind;       /* Function to wind to */
  355     ec_handler_f handler; /* FOP manager function */
  356     ec_resume_f resume;
  357     ec_cbk_t cbks; /* Callback function for this FOP */
  358     void *data;
  359     ec_heal_t *heal;
  360     struct list_head healer;
  361 
  362     uint64_t user_size;
  363     uint32_t head;
  364 
  365     int32_t use_fd; /* Indicates whether this FOP uses FD or
  366                        not */
  367 
  368     dict_t *xdata;
  369     dict_t *dict;
  370     int32_t int32;
  371     uint32_t uint32;
  372     uint64_t size;
  373     off_t offset;
  374     mode_t mode[2];
  375     entrylk_cmd entrylk_cmd;
  376     entrylk_type entrylk_type;
  377     gf_xattrop_flags_t xattrop_flags;
  378     dev_t dev;
  379     inode_t *inode;
  380     fd_t *fd; /* FD of the file on which FOP is
  381                  being carried upon */
  382     struct iatt iatt;
  383     char *str[2];
  384     loc_t loc[2]; /* Holds the location details for
  385                      the file */
  386     struct gf_flock flock;
  387     struct iovec *vector;
  388     struct iobref *buffers;
  389     gf_seek_what_t seek;
  390     ec_fragment_range_t frag_range; /* This will hold the range of stripes
  391                                         affected by the fop. */
  392     char *errstr;                   /*String of fop name, path and gfid
  393                                      to be used in gf_msg. */
  394 };
  395 
  396 struct _ec_cbk_data {
  397     struct list_head list;        /* item in the sorted list of groups */
  398     struct list_head answer_list; /* item in the list of answers */
  399     ec_fop_data_t *fop;
  400     ec_cbk_data_t *next; /* next answer in the same group */
  401     uint32_t idx;
  402     int32_t op_ret;
  403     int32_t op_errno;
  404     int32_t count;
  405     uintptr_t mask;
  406 
  407     dict_t *xdata;
  408     dict_t *dict;
  409     int32_t int32;
  410     uintptr_t uintptr[3];
  411     uint64_t size;
  412     uint64_t version[2];
  413     inode_t *inode;
  414     fd_t *fd;
  415     struct statvfs statvfs;
  416     struct iatt iatt[5];
  417     struct gf_flock flock;
  418     struct iovec *vector;
  419     struct iobref *buffers;
  420     char *str;
  421     gf_dirent_t entries;
  422     off_t offset;
  423     gf_seek_what_t what;
  424 };
  425 
  426 enum _ec_gf_opcode {
  427     EC_GF_OP_LOAD,
  428     EC_GF_OP_STORE,
  429     EC_GF_OP_COPY,
  430     EC_GF_OP_XOR2,
  431     EC_GF_OP_XOR3,
  432     EC_GF_OP_XORM,
  433     EC_GF_OP_END
  434 };
  435 
  436 struct _ec_gf_op {
  437     ec_gf_opcode_t op;
  438     uint32_t arg1;
  439     uint32_t arg2;
  440     uint32_t arg3;
  441 };
  442 
  443 struct _ec_gf_mul {
  444     uint32_t regs;
  445     uint32_t map[EC_GF_MAX_REGS];
  446     ec_gf_op_t *ops;
  447 };
  448 
  449 struct _ec_gf {
  450     uint32_t bits;
  451     uint32_t size;
  452     uint32_t mod;
  453     uint32_t min_ops;
  454     uint32_t max_ops;
  455     uint32_t avg_ops;
  456     uint32_t *log;
  457     uint32_t *pow;
  458     ec_gf_mul_t **table;
  459 };
  460 
  461 struct _ec_code_gen {
  462     char *name;
  463     char **flags;
  464     uint32_t width;
  465 
  466     void (*prolog)(ec_code_builder_t *builder);
  467     void (*epilog)(ec_code_builder_t *builder);
  468     void (*load)(ec_code_builder_t *builder, uint32_t reg, uint32_t offset,
  469                  uint32_t bit);
  470     void (*store)(ec_code_builder_t *builder, uint32_t reg, uint32_t bit);
  471     void (*copy)(ec_code_builder_t *builder, uint32_t dst, uint32_t src);
  472     void (*xor2)(ec_code_builder_t *builder, uint32_t dst, uint32_t src);
  473     void (*xor3)(ec_code_builder_t *builder, uint32_t dst, uint32_t src1,
  474                  uint32_t src2);
  475     void (*xorm)(ec_code_builder_t *builder, uint32_t dst, uint32_t offset,
  476                  uint32_t bit);
  477 };
  478 
  479 struct _ec_code {
  480     gf_lock_t lock;
  481     struct list_head spaces;
  482     ec_gf_t *gf;
  483     ec_code_gen_t *gen;
  484 };
  485 
  486 struct _ec_code_arg {
  487     uint32_t value;
  488 };
  489 
  490 struct _ec_code_op {
  491     ec_gf_opcode_t op;
  492     ec_code_arg_t arg1;
  493     ec_code_arg_t arg2;
  494     ec_code_arg_t arg3;
  495 };
  496 
  497 struct _ec_code_builder {
  498     ec_code_t *code;
  499     uint64_t address;
  500     uint8_t *data;
  501     uint32_t size;
  502     int32_t error;
  503     uint32_t regs;
  504     uint32_t bits;
  505     uint32_t width;
  506     uint32_t count;
  507     uint32_t base;
  508     uint32_t map[EC_GF_MAX_REGS];
  509     gf_boolean_t linear;
  510     uint64_t loop;
  511     ec_code_op_t ops[0];
  512 };
  513 
  514 struct _ec_code_chunk {
  515     struct list_head list;
  516     size_t size;
  517     ec_code_space_t *space;
  518 };
  519 
  520 struct _ec_code_space {
  521     struct list_head list;
  522     struct list_head chunks;
  523     ec_code_t *code;
  524     void *exec;
  525     size_t size;
  526 };
  527 
  528 union _ec_code_func {
  529     ec_code_func_linear_t linear;
  530     ec_code_func_interleaved_t interleaved;
  531 };
  532 
  533 struct _ec_matrix_row {
  534     ec_code_func_t func;
  535     uint32_t *values;
  536 };
  537 
  538 struct _ec_matrix {
  539     struct list_head lru;
  540     uint32_t refs;
  541     uint32_t columns;
  542     uint32_t rows;
  543     uintptr_t mask;
  544     ec_code_t *code;
  545     uint32_t *values;
  546     ec_matrix_row_t row_data[0];
  547 };
  548 
  549 struct _ec_matrix_list {
  550     struct list_head lru;
  551     gf_lock_t lock;
  552     uint32_t columns;
  553     uint32_t rows;
  554     uint32_t max;
  555     uint32_t count;
  556     uint32_t stripe;
  557     struct mem_pool *pool;
  558     ec_gf_t *gf;
  559     ec_code_t *code;
  560     ec_matrix_t *encode;
  561     ec_matrix_t **objects;
  562 };
  563 
  564 struct _ec_heal {
  565     struct list_head list;
  566     gf_lock_t lock;
  567     xlator_t *xl;
  568     ec_fop_data_t *fop;
  569     void *data;
  570     ec_fop_data_t *lookup;
  571     loc_t loc;
  572     struct iatt iatt;
  573     char *symlink;
  574     fd_t *fd;
  575     int32_t partial;
  576     int32_t done;
  577     int32_t error;
  578     gf_boolean_t nameheal;
  579     uintptr_t available;
  580     uintptr_t good;
  581     uintptr_t bad;
  582     uintptr_t open;
  583     uintptr_t fixed;
  584     uint64_t offset;
  585     uint64_t size;
  586     uint64_t total_size;
  587     uint64_t version[2];
  588     uint64_t raw_size;
  589 };
  590 
  591 struct subvol_healer {
  592     xlator_t *this;
  593     int subvol;
  594     gf_boolean_t running;
  595     gf_boolean_t rerun;
  596     pthread_mutex_t mutex;
  597     pthread_cond_t cond;
  598     pthread_t thread;
  599 };
  600 
  601 struct _ec_self_heald {
  602     gf_boolean_t iamshd;
  603     gf_boolean_t enabled;
  604     int timeout;
  605     uint32_t max_threads;
  606     uint32_t wait_qlength;
  607     struct subvol_healer *index_healers;
  608     struct subvol_healer *full_healers;
  609 };
  610 
  611 struct _ec_statistics {
  612     struct {
  613         gf_atomic_t hits;    /* Cache hits. */
  614         gf_atomic_t misses;  /* Cache misses. */
  615         gf_atomic_t updates; /* Number of times an existing stripe has
  616                                 been updated with new content. */
  617         gf_atomic_t invals;  /* Number of times an existing stripe has
  618                                 been invalidated because of truncates
  619                                 or discards. */
  620         gf_atomic_t evicts;  /* Number of times that an existing entry
  621                                 has been evicted to make room for newer
  622                                 entries. */
  623         gf_atomic_t allocs;  /* Number of memory allocations made to
  624                                 store stripes. */
  625         gf_atomic_t errors;  /* Number of errors that have caused extra
  626                                 requests. (Basically memory allocation
  627                                 errors). */
  628     } stripe_cache;
  629 };
  630 
  631 struct _ec {
  632     xlator_t *xl;
  633     int32_t healers;
  634     int32_t heal_waiters;
  635     int32_t nodes; /* Total number of bricks(n) */
  636     int32_t bits_for_nodes;
  637     int32_t fragments;      /* Data bricks(k) */
  638     int32_t redundancy;     /* Redundant bricks(m) */
  639     uint32_t fragment_size; /* Size of fragment/chunk on a
  640                                brick. */
  641     uint32_t stripe_size;   /* (fragment_size * fragments)
  642                                maximum size of user data
  643                                stored in one stripe. */
  644     int32_t up;             /* Represents whether EC volume is
  645                                up or not. */
  646     uint32_t idx;
  647     uint32_t xl_up_count;     /* Number of UP bricks. */
  648     uintptr_t xl_up;          /* Bit flag representing UP
  649                                  bricks */
  650     uint32_t xl_notify_count; /* Number of notifications. */
  651     uintptr_t xl_notify;      /* Bit flag representing
  652                                  notification for bricks. */
  653     uintptr_t node_mask;
  654     uintptr_t read_mask;         /*Stores user defined read-mask*/
  655     gf_atomic_t async_fop_count; /* Number of on going asynchronous fops. */
  656     xlator_t **xl_list;
  657     gf_lock_t lock;
  658     gf_timer_t *timer;
  659     gf_boolean_t shutdown;
  660     gf_boolean_t eager_lock;
  661     gf_boolean_t other_eager_lock;
  662     gf_boolean_t optimistic_changelog;
  663     gf_boolean_t parallel_writes;
  664     uint32_t stripe_cache;
  665     uint32_t quorum_count;
  666     uint32_t background_heals;
  667     uint32_t heal_wait_qlen;
  668     uint32_t self_heal_window_size; /* max size of read/writes */
  669     uint32_t eager_lock_timeout;
  670     uint32_t other_eager_lock_timeout;
  671     struct list_head pending_fops;
  672     struct list_head heal_waiting;
  673     struct list_head healing;
  674     struct mem_pool *fop_pool;
  675     struct mem_pool *cbk_pool;
  676     struct mem_pool *lock_pool;
  677     ec_self_heald_t shd;
  678     char vol_uuid[UUID_SIZE + 1];
  679     dict_t *leaf_to_subvolid;
  680     ec_read_policy_t read_policy;
  681     ec_matrix_list_t matrix;
  682     ec_statistics_t stats;
  683 };
  684 
  685 #endif /* __EC_TYPES_H__ */