Skip to content

Commit

Permalink
dm raid: prohibit to pass in both sync and nosync ctr flags
Browse files Browse the repository at this point in the history
Signed-off-by: Heinz Mauelshagen <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
  • Loading branch information
mauelsha authored and snitm committed Jul 18, 2016
1 parent ff4a88b commit 0d851d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/md/dm-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,12 @@ static int parse_raid_params(struct raid_set *rs, struct dm_arg_set *as,
}
}

if (test_bit(__CTR_FLAG_SYNC, &rs->ctr_flags) &&
test_bit(__CTR_FLAG_NOSYNC, &rs->ctr_flags)) {
rs->ti->error = "sync and nosync are mutually exclusive";
return -EINVAL;
}

if (validate_region_size(rs, region_size))
return -EINVAL;

Expand Down

0 comments on commit 0d851d1

Please sign in to comment.