Commit 105db599 authored by Mike Snitzer's avatar Mike Snitzer

dm raid: cleanup awkward branching in raid_message() option processing

Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 977f1a0a
...@@ -3464,10 +3464,11 @@ static int raid_message(struct dm_target *ti, unsigned int argc, char **argv) ...@@ -3464,10 +3464,11 @@ static int raid_message(struct dm_target *ti, unsigned int argc, char **argv)
else { else {
if (!strcasecmp(argv[0], "check")) if (!strcasecmp(argv[0], "check"))
set_bit(MD_RECOVERY_CHECK, &mddev->recovery); set_bit(MD_RECOVERY_CHECK, &mddev->recovery);
else if (!!strcasecmp(argv[0], "repair")) else if (!strcasecmp(argv[0], "repair")) {
set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
set_bit(MD_RECOVERY_SYNC, &mddev->recovery);
} else
return -EINVAL; return -EINVAL;
set_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
set_bit(MD_RECOVERY_SYNC, &mddev->recovery);
} }
if (mddev->ro == 2) { if (mddev->ro == 2) {
/* A write to sync_action is enough to justify /* A write to sync_action is enough to justify
......
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