]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
dm raid: fix raid set size revalidation
authorHeinz Mauelshagen <heinzm@redhat.com>
Sat, 2 Dec 2017 00:03:51 +0000 (01:03 +0100)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Mon, 19 Mar 2018 23:42:00 +0000 (20:42 -0300)
commita61abc543991258391b78d25d6c747eb35d1abec
tree5ada503fc9345bf87ba8dca4a5abaea2f77ea9b2
parentc23b880f0ee95299390cba7d02d68cd5f29ee60b
dm raid: fix raid set size revalidation

BugLink: http://bugs.launchpad.net/bugs/1756978
[ 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>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/md/dm-raid.c