diff options
| -rw-r--r-- | libglusterfs/src/glusterfs.h | 2 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 17 | 
2 files changed, 19 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 1988c33d6c4..d5189917dea 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -167,6 +167,8 @@  /* Index xlator related */  #define GF_XATTROP_INDEX_GFID "glusterfs.xattrop_index_gfid"  #define GF_XATTROP_INDEX_COUNT "glusterfs.xattrop_index_count" +#define GF_XATTROP_DIRTY_GFID "glusterfs.xattrop_dirty_gfid" +#define GF_XATTROP_DIRTY_COUNT "glusterfs.xattrop_dirty_count"  #define GF_HEAL_INFO "glusterfs.heal-info"  #define GF_AFR_HEAL_SBRAIN "glusterfs.heal-sbrain" diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 29e5fe9b3f9..f021aaec73c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1834,6 +1834,7 @@ brick_graph_add_index (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,                          dict_t *set_dict, glusterd_brickinfo_t *brickinfo)  {          xlator_t        *xl = NULL; +        char            *pending_xattr = NULL;          char            index_basepath[PATH_MAX]   = {0};          int             ret = -1; @@ -1855,7 +1856,23 @@ brick_graph_add_index (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,                  if (ret)                          goto out;          } +        if ((volinfo->type == GF_CLUSTER_TYPE_STRIPE_REPLICATE || +            volinfo->type == GF_CLUSTER_TYPE_REPLICATE)) { +                ret = xlator_set_option (xl, "xattrop-dirty-watchlist", +                                         "trusted.afr.dirty"); +                if (ret) +                        goto out; +                ret = gf_asprintf (&pending_xattr, "trusted.afr.%s-", +                                   volinfo->volname); +                if (ret < 0) +                        goto out; +                ret = xlator_set_option (xl, "xattrop-pending-watchlist", +                                         pending_xattr); +                if (ret) +                        goto out; +        }  out: +        GF_FREE (pending_xattr);          return ret;  }  | 
