Commit 1d2d4524 authored by Kevin Corry's avatar Kevin Corry Committed by Linus Torvalds

[PATCH] dm: dm-raid1.c: Enforce max of 9 mirrors

dm-raid1.c: Since kcopyd can currently only handle 1 source and up to 8
destinations, enforce a max of 9 mirrors when creating a dm-mirror device.
Signed-off-by: default avatarKevin Corry <kevcorry@us.ibm.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ae1a7381
......@@ -1028,7 +1028,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv)
argc -= args_used;
if (!argc || sscanf(argv[0], "%u", &nr_mirrors) != 1 ||
nr_mirrors < 2) {
nr_mirrors < 2 || nr_mirrors > KCOPYD_MAX_REGIONS + 1) {
ti->error = "dm-mirror: Invalid number of mirrors";
dm_destroy_dirty_log(dl);
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