Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / filesystems / glusterfs / patches / patch-db
blobf8e74e75993a6e5374009ccb68aca527fde5c181
1 $NetBSD$
3 Always enable DHT so that scaling from 1 brick to more does not raise
4 spurious EINVAL
6 From upstream http://review.gluster.org/3838
8 --- xlators/mgmt/glusterd/src/glusterd-volgen.c.orig
9 +++ xlators/mgmt/glusterd/src/glusterd-volgen.c
10 @@ -2362,7 +2362,6 @@ volgen_graph_build_dht_cluster (volgen_graph_t *graph,
11          char                    *decommissioned_children = NULL;
12          xlator_t                *dht                     = NULL;
14 -        GF_ASSERT (child_count > 1);
15          clusters = volgen_graph_build_clusters (graph,  volinfo,
16                                                  "cluster/distribute", "%s-dht",
17                                                  child_count, child_count);
18 @@ -2455,12 +2454,16 @@ volume_volgen_graph_build_clusters (volgen_graph_t *graph,
20  build_distribute:
21          dist_count = volinfo->brick_count / volinfo->dist_leaf_count;
22 -        if (dist_count > 1) {
23 -                ret = volgen_graph_build_dht_cluster (graph, volinfo,
24 -                                                      dist_count);
25 -                if (ret)
26 -                        goto out;
27 +        if (!dist_count) {
28 +                ret = -1;
29 +                goto out;
30          }
32 +        ret = volgen_graph_build_dht_cluster (graph, volinfo,
33 +                                              dist_count);
34 +        if (ret)
35 +                goto out;
37          ret = 0;
38  out:
39          return ret;