From 9f3bd60c79a5c0941af7af8422299769f23b77df Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 6 Apr 2009 15:53:31 +1000 Subject: [PATCH] Create: round to chunk size There are probably other places where rounding size to chunksize is needed, or useful, but this is a good start. Signed-off-by: NeilBrown --- Create.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Create.c b/Create.c index d33f8914..9f52b41d 100644 --- a/Create.c +++ b/Create.c @@ -261,6 +261,8 @@ int Create(struct supertype *st, char *mddev, return 1; } + if (size && chunk) + size &= ~(unsigned long long)(chunk - 1); newsize = size * 2; if (st && ! st->ss->validate_geometry(st, level, layout, raiddisks, chunk, size*2, NULL, &newsize, verbose>=0)) -- 2.47.3