From 3cb713f2aec3c2191cf8fd2df830b92bf3ad92d4 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Wed, 13 May 2015 20:33:45 +0530 Subject: tier: Do not allow detach-tier commands on a non-tiered volume Change-Id: Ic92d25db68e40ef4a4388ef42affd1b3ee5a7ec6 BUG: 1221270 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/10773 Reviewed-by: Atin Mukherjee Reviewed-by: Raghavendra G Reviewed-by: Kaushal M Tested-by: Gluster Build System Tested-by: NetBSD Build System --- xlators/cluster/dht/src/dht-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 092ddebb8f5..3a1a9422d46 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -6846,7 +6846,8 @@ dht_notify (xlator_t *this, int event, void *data, ...) gf_defrag_status_get (defrag, output); else if (cmd == GF_DEFRAG_CMD_START_DETACH_TIER) gf_defrag_start_detach_tier(defrag); - else if (cmd == GF_DEFRAG_CMD_STOP) + else if (cmd == GF_DEFRAG_CMD_STOP || + cmd == GF_DEFRAG_CMD_STOP_DETACH_TIER) gf_defrag_stop (defrag, GF_DEFRAG_STATUS_STOPPED, output); } -- cgit