md: fix update super 1.0 on rdev size change
authorMarkus Hochholdinger <markus@hochholdinger.net>
Tue, 16 Nov 2021 10:21:35 +0000 (10:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Dec 2021 09:57:14 +0000 (10:57 +0100)
commit50dacb2289e50a3ef8daf581f93f834147629915
tree87a8f94493ea26c94898676ab9bda13ea733284c
parent00cd8a99885c78efad89e84bc07d49d6eea7615c
md: fix update super 1.0 on rdev size change

commit 55df1ce0d4e086e05a8ab20619c73c729350f965 upstream.

The superblock of version 1.0 doesn't get moved to the new position on a
device size change. This leads to a rdev without a superblock on a known
position, the raid can't be re-assembled.

The line was removed by mistake and is re-added by this patch.

Fixes: d9c0fa509eaf ("md: fix max sectors calculation for super 1.0")
Cc: stable@vger.kernel.org
Signed-off-by: Markus Hochholdinger <markus@hochholdinger.net>
Reviewed-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/md.c