summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/stripe/src/stripe.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index a06d275df..8f6790777 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -3750,6 +3750,18 @@ set_stripe_block_size (xlator_t *this, stripe_private_t *priv, char *data)
"invalid number format \"%s\"", num);
goto out;
}
+
+ if (stripe_opt->block_size < 512) {
+ gf_log (this->name, GF_LOG_ERROR, "Invalid Block-size: "
+ "%s. Should be atleast 512 bytes", num);
+ goto out;
+ }
+ if (stripe_opt->block_size % 512) {
+ gf_log (this->name, GF_LOG_ERROR, "Block-size: %s should"
+ " be a multiple of 512 bytes", num);
+ goto out;
+ }
+
memcpy (stripe_opt->path_pattern, pattern, strlen (pattern));
gf_log (this->name, GF_LOG_DEBUG,