]> git.ipfire.org Git - thirdparty/mdadm.git/commit
MDADM:Check mdinfo->reshape_active more times before calling Grow_continue
authorXiao Ni <xni@redhat.com>
Thu, 16 Jun 2016 01:41:02 +0000 (09:41 +0800)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 16 Jun 2016 17:53:45 +0000 (13:53 -0400)
commit8800f85381d0cd9689dee62bbbdafdb359100389
tree1c712dcc645e60a3a38f1ae137882524baf1ffa7
parent6e6e98746dba7e900f23e92bbb0da01fe7a169da
MDADM:Check mdinfo->reshape_active more times before calling Grow_continue

When reshaping a 3 drives raid5 to 4 drives raid5, there is a chance that
it can't start the reshape. If the disks are not enough to have spaces for
relocating the data_offset, it needs to call start_reshape and then run
mdadm --grow --continue by systemd. But mdadm --grow --continue fails
because it checkes that info->reshape_active is 0.

The info->reshape_active is got from the superblock of underlying devices.
Function start_reshape write reshape to /sys/../sync_action. Before writing
latest superblock to underlying devices, mdadm --grow --continue is called.
There is a chance info->reshape_active is 0. We should wait for superblock
updating more time before calling Grow_continue.

Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Grow.c