md/raid5-cache: disable reshape completely
authorShaohua Li <shli@fb.com>
Wed, 29 Aug 2018 18:05:42 +0000 (11:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2018 06:54:20 +0000 (08:54 +0200)
commit36fadeb87be802a609f03564e950a9f50b9e3855
tree64ed06a1543dc765346bbaea1fd7d275f93d70a2
parentdc492842b7001b299299ffafe078ba5777096edd
md/raid5-cache: disable reshape completely

[ Upstream commit e254de6bcf3f5b6e78a92ac95fb91acef8adfe1a ]

We don't support reshape yet if an array supports log device. Previously we
determine the fact by checking ->log. However, ->log could be NULL after a log
device is removed, but the array is still marked to support log device. Don't
allow reshape in this case too. User can disable log device support by setting
'consistency_policy' to 'resync' then do reshape.

Reported-by: Xiao Ni <xni@redhat.com>
Tested-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid5-log.h
drivers/md/raid5.c