dm raid: fix raid set size revalidation
authorHeinz Mauelshagen <heinzm@redhat.com>
Sat, 2 Dec 2017 00:03:51 +0000 (01:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 07:42:54 +0000 (08:42 +0100)
commit8834a75d8acb94e5f840204a296a09b08351757a
tree34768a02922a2160340ea9a1c56da046d70649b5
parent77ec30a0b35eb9f1cc17555708999c20502aa6ec
dm raid: fix raid set size revalidation

[ Upstream commit 61e06e2c3ebd986050958513bfa40dceed756f8f ]

The raid set size is being revalidated unconditionally before a
reshaping conversion is started.  MD requires the size to only be
reduced in case of a stripe removing (i.e. shrinking) reshape but not
when growing because the raid array has to stay small until after the
growing reshape finishes.

Fix by avoiding the size revalidation in preresume unless a shrinking
reshape is requested.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-raid.c