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
This commit is contained in:
parent
d1f3cdc4dc
commit
b80fac5417
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user