From 2f29065ae4715c9c4a9d20c4d15311bebd3ddb0e Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Mon, 2 May 2016 18:45:44 +0530 Subject: afr: Automagic unsplit-brain by [ctime|mtime|size|majority] 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: I3c099a0404082213860f74f2c9b4d207cfaedb76 BUG: 1328224 Original-author: Richard Wareing Signed-off-by: Ravishankar N Reviewed-on: http://review.gluster.org/14026 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Anuradha Talur Reviewed-by: Jeff Darcy --- xlators/mgmt/glusterd/src/glusterd-volume-set.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 0600290cbe0..9f089e8dd3b 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", -- cgit