]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super-intel.c
imsm: FIX: Do not write check-point '0'
authorAdam Kwolek <adam.kwolek@intel.com>
Mon, 2 May 2011 06:12:03 +0000 (16:12 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 2 May 2011 06:12:03 +0000 (16:12 +1000)
commitbfd80a56774f29661e5471b9c36e563fadace90f
treeec40ee651b4cccac7f8fbc822e8162105e202c74
parent7e90264df5060cd308ce56206ec7dfa29e2aa041
imsm: FIX: Do not write check-point '0'

When 2 arrays are configured in container and arrays are reassembled during
rebuild or initialization, checkpoint for one array can be reset. It depends
on arrays assembly order.

Scenario:
1. Create 2 arrays (e.g. raid5)
2. Add spare to container
3. Degrade arrays /rebuild starts on array #1 and continues to n%/
4. Reassembly arrays
5. Rebuild starts on array #2 /because of assembly order/ from 0%
6. On first checkpoint stored for array #2 (non 0 value), checkpoint
   for array #1 is cleared /it is delayed rebuild in md, so progress is 0/
7. Rebuild on #1 starts from n% /it was configured before checkpoint
   was cleared/.

Any next reassembly during rebuild of #2 array (after p.6) causes
checkpoint information lost for array #1.

Solution is not store checkpoint for progress == 0.
Checkpoint is set to 0 when rebuild/initialization starts.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c