From ef01bd3f7cc37c3d79b3d075304aa9faaf95b190 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 11 Mar 2004 16:14:23 -0800 Subject: [PATCH] [PATCH] dm: stripe width fix dm-stripe.c: The stripe width must be at least the page size. --- drivers/md/dm-stripe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index 70b5553fc09a6..ce6da00c82a06 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c @@ -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; } -- 2.53.0