diff options
author | Ravishankar N <ravishankar@redhat.com> | 2016-05-25 21:18:19 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2016-05-27 07:56:37 -0700 |
commit | 6f08b9f2b006a4eafaa176cfd792038eed7f6c98 (patch) | |
tree | df77633dff8909d3a50d9d55524f216172ec2ed4 /xlators/mgmt | |
parent | bc47e3255e35a2e02675d4d74e49138274b33f66 (diff) |
afr: Automagic unsplit-brain by [ctime|mtime|size|majority]
Backport of http://review.gluster.org/#/c/14026/
Introduce cluster.favorite-child-policy which when enabled with
[ctime|mtime|size|majority], automatically heals files that are in
split-brian.
The majority policy will not pick a source if there is no majority.
The other three policies pick the first brick with a valid reply and
non-zero ctime/mtime/size as source.
Change-Id: I93623a914dce2839957fce87b514050e9d274d4c
BUG: 1339639
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/14535
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 134ea8639f0..36e5483ee87 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1293,6 +1293,12 @@ struct volopt_map_entry glusterd_volopt_map[] = { .op_version = GD_OP_VERSION_3_7_10, .flags = OPT_FLAG_CLIENT_OPT }, + { .key = "cluster.favorite-child-policy", + .voltype = "cluster/replicate", + .type = DOC, + .op_version = GD_OP_VERSION_3_7_12, + .flags = OPT_FLAG_CLIENT_OPT + }, /* stripe xlator options */ { .key = "cluster.stripe-block-size", |