]> git.ipfire.org Git - thirdparty/mdadm.git/commit
monitor: Make sure that last_checkpoint is set to 0 after sync
authorPawel Baldysiak <pawel.baldysiak@intel.com>
Thu, 16 Jun 2016 09:12:20 +0000 (11:12 +0200)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 16 Jun 2016 17:55:09 +0000 (13:55 -0400)
commit955aa6cf75a5f8a6def83189a839c5b75d5ecff9
treec94e65765ab9da31299e5bd2156de217538e2272
parent8800f85381d0cd9689dee62bbbdafdb359100389
monitor: Make sure that last_checkpoint is set to 0 after sync

In a case of successful completion of a resync (in the last step)
- read_and_act sometimes still reads sync_action as "resync"
but sync_completed already is set to component_size.
When this race occurs, sync operation is
marked as finished, but last_checkpoint is
overwritten with sync_completed. It will cause next
sync operation (ie. reshape) to be reported as complete immediately
after start - mdmon will write successful completion of the reshape
to metadata. This patch sets last_checkpoint to 0 once the sync
is completed to stop it happening.

Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
monitor.c