dm raid: fix raid set size revalidation
authorHeinz Mauelshagen <heinzm@redhat.com>
Sat, 2 Dec 2017 00:03:51 +0000 (01:03 +0100)
committerMike Snitzer <snitzer@redhat.com>
Fri, 8 Dec 2017 15:59:57 +0000 (10:59 -0500)
commit61e06e2c3ebd986050958513bfa40dceed756f8f
tree3dbb38d142ac4cfdb716f27f5f5bc8e86ae366f7
parent7501537ee3a5e6bd01c0084af141e4fa84e652c0
dm raid: fix raid set size revalidation

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>
drivers/md/dm-raid.c