diff options
| author | N Balachandran <nbalacha@redhat.com> | 2015-10-20 09:18:10 +0530 | 
|---|---|---|
| committer | Dan Lambright <dlambrig@redhat.com> | 2015-10-20 18:39:29 -0700 | 
| commit | 3ef95b2707a55b4995cf5607ee8d20d76081024e (patch) | |
| tree | 7ee22c23fb5bd754262baf0668236df03002157c | |
| parent | 4d52bf330db23a6a03fc69a405c351a5e1ea7b64 (diff) | |
cluster/tier: Changed tier xattr-name value
Each tier layer (for future stacking implementations)
must have a unique xattr name. We are currently using
the name of the tier subvolume excluding the volume name.
Change-Id: Id4adea61dc1c8473fb1d4d7364d1940278c6e129
BUG: 1273246
>Signed-off-by: N Balachandran <nbalacha@redhat.com>
> Reviewed-on: http://review.gluster.org/12350
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
> Tested-by: Dan Lambright <dlambrig@redhat.com>
(cherry picked from commit 0243085e40d842c59f4d7d59c61701ba416878ec)
Signed-off-by: Nithya Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/12398
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rebalance.c | 2 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 26 | 
2 files changed, 15 insertions, 13 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index 69f120efd3d..b41f73d36ef 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -292,7 +292,7 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr,          if (volinfo->type == GF_CLUSTER_TYPE_TIER) {                  runner_add_arg (&runner, "--xlator-option");                  runner_argprintf (&runner, -                                  "*tier-dht.xattr-name=trusted.tier-gfid"); +                                  "*tier-dht.xattr-name=trusted.tier.tier-dht");          }          runner_add_arg (&runner, "--xlator-option"); diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index bf55d52f440..a497129497f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -3528,18 +3528,18 @@ volume_volgen_graph_build_clusters_tier (volgen_graph_t *graph,                                           glusterd_volinfo_t *volinfo,                                           gf_boolean_t is_quotad)  { -        int                ret = -1; -        xlator_t          *root; +        int                ret                     = -1; +        xlator_t          *root                    = NULL;          xlator_t          *xl, *hxl, *cxl; -        glusterd_brickinfo_t    *brick              = NULL; -        char              *rule; -        int                st_brick_count = 0; -        int                st_replica_count = 0; -        int                st_disperse_count = 0; -        int                st_dist_leaf_count = 0; -        int                st_type = 0; -        int                dist_count = 0; -        int                start_count = 0; +        glusterd_brickinfo_t    *brick             = NULL; +        char              *rule                    = NULL; +        int                st_brick_count          = 0; +        int                st_replica_count        = 0; +        int                st_disperse_count       = 0; +        int                st_dist_leaf_count      = 0; +        int                st_type                 = 0; +        int                dist_count              = 0; +        int                start_count             = 0;          char              *decommissioned_children = NULL;          st_brick_count     = volinfo->brick_count; @@ -3619,7 +3619,8 @@ volume_volgen_graph_build_clusters_tier (volgen_graph_t *graph,          if (ret)                  goto out; -        ret = xlator_set_option(xl, "xattr-name", "trusted.tier-gfid"); +        /*Each dht/tier layer must have a different xattr name*/ +        ret = xlator_set_option(xl, "xattr-name", "trusted.tier.tier-dht");          if (ret)                  goto out; @@ -3647,6 +3648,7 @@ volume_volgen_graph_build_clusters_tier (volgen_graph_t *graph,          volinfo->dist_leaf_count = st_dist_leaf_count;          volinfo->tier_info.cur_tier_hot = 0; +        GF_FREE (rule);          return ret;  }  | 
