From b80fac541701689b07940be518431bacb101f09f Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 26 Nov 2009 03:29:46 +0000 Subject: don't allow stripe with just one subvolume stripe code assumes in many places that it will have more than one subvolume, but the strict check was not there in init, hence, if somebody configures stripe with just one subvolume, it will cause many fops with frame loss. Signed-off-by: Amar Tumballi Signed-off-by: Anand V. Avati BUG: 340 (Kernel Compilation fail in stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=340 --- xlators/cluster/stripe/src/stripe.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/stripe') diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index 1746b2e7..4f676435 100644 --- a/xlators/cluster/stripe/src/stripe.c +++ b/xlators/cluster/stripe/src/stripe.c @@ -3661,7 +3661,13 @@ init (xlator_t *this) gf_log (this->name, GF_LOG_WARNING, "dangling volume. check volfile "); } - + + if (count == 1) { + gf_log (this->name, GF_LOG_ERROR, + "stripe configured with only one \"subvolumes\" option." + " please check the volume. exiting"); + goto out; + } priv = CALLOC (1, sizeof (stripe_private_t)); if (!priv) goto out; -- cgit