From 08d18ef9257067fac510af408665360019566000 Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Fri, 25 Mar 2016 18:48:30 +0530 Subject: afr: add mtime based split-brain resolution to CLI Extended the CLI to include support for split-brain resolution based on mtime. The command syntax is: $:gluster volume heal split-brain latest-mtime where can be either the full file name as seen from the root of the volume (or) the gfid-string representation of the file. Change-Id: I7a16f72ff1a4495aa69f43f22758a9404e958b4f BUG: 1321322 Signed-off-by: Ravishankar N Reviewed-on: http://review.gluster.org/13828 Smoke: Gluster Build System Reviewed-by: Pranith Kumar Karampuri CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System --- cli/src/cli-cmd-parser.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cli/src/cli-cmd-parser.c') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index a3d46b60231..59c27b87f48 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -3594,6 +3594,16 @@ cli_cmd_volume_heal_options_parse (const char **words, int wordcount, goto out; goto done; } + if (!strcmp (words[4], "latest-mtime")) { + ret = dict_set_int32 (dict, "heal-op", + GF_SHD_OP_SBRAIN_HEAL_FROM_LATEST_MTIME); + if (ret) + goto out; + ret = dict_set_str (dict, "file", (char *)words[5]); + if (ret) + goto out; + goto done; + } if (!strcmp (words[4], "source-brick")) { ret = dict_set_int32 (dict, "heal-op", GF_SHD_OP_SBRAIN_HEAL_FROM_BRICK); -- cgit