summaryrefslogtreecommitdiff
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2017-07-13 18:33:22 +0300
committerMike Snitzer <snitzer@redhat.com>2017-07-25 21:54:18 +0300
commitbbac1e06a415c0658dd328ba9c5f640c2d97be3a (patch)
tree7c158aa6528e530a828e629b0bae47ff4b6997ed /drivers/md/dm-raid.c
parentedc11d49f88e3281457853a530c9e5a5540b355a (diff)
downloadlinux-bbac1e06a415c0658dd328ba9c5f640c2d97be3a.tar.xz
dm raid: remove WARN_ON() in raid10_md_layout_to_format()
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r--drivers/md/dm-raid.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 2e10c2f13a34..b409015c6909 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -564,9 +564,10 @@ static const char *raid10_md_layout_to_format(int layout)
if (__raid10_near_copies(layout) > 1)
return "near";
- WARN_ON(__raid10_far_copies(layout) < 2);
+ if (__raid10_far_copies(layout) > 1)
+ return "far";
- return "far";
+ return "unknown";
}
/* Return md raid10 algorithm for @name */