Commit ef01bd3f authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dm: stripe width fix

dm-stripe.c: The stripe width must be at least the page size.
parent c0ffbd19
......@@ -97,7 +97,8 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
/*
* chunk_size is a power of two
*/
if (!chunk_size || (chunk_size & (chunk_size - 1))) {
if (!chunk_size || (chunk_size & (chunk_size - 1)) ||
(chunk_size < (PAGE_SIZE >> SECTOR_SHIFT))) {
ti->error = "dm-stripe: Invalid chunk size";
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment