Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 964e7913 authored by raz ben yehuda's avatar raz ben yehuda Committed by NeilBrown
Browse files

md: raid10: chunk size check in run



have raid10 check chunk size in run method instead of in md

Signed-off-by: default avatar <raziebe@gmail.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 92e59b6b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2050,9 +2050,10 @@ static int run(mddev_t *mddev)
	int nc, fc, fo;
	sector_t stride, size;

	if (mddev->chunk_size < PAGE_SIZE) {
	if (mddev->chunk_size < PAGE_SIZE ||
	    !is_power_of_2(mddev->chunk_size)) {
		printk(KERN_ERR "md/raid10: chunk size must be "
		       "at least PAGE_SIZE(%ld).\n", PAGE_SIZE);
		       "at least PAGE_SIZE(%ld) and be a power of 2.\n", PAGE_SIZE);
		return -EINVAL;
	}