summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/stripe
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2009-11-26 03:29:46 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-26 02:48:59 -0800
commitb80fac541701689b07940be518431bacb101f09f (patch)
tree469b7410f5ee9f65aa14d307a9c5a3ffa827904c /xlators/cluster/stripe
parentd1f3cdc4dcae63b1bb8e6fd6ff0db791646e2ad2 (diff)
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 <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 340 (Kernel Compilation fail in stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=340
Diffstat (limited to 'xlators/cluster/stripe')
-rw-r--r--xlators/cluster/stripe/src/stripe.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index 1746b2e7216..4f676435150 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;