[Drbd-dev] DRBD-8: Update to handle I/O failures during resync
Graham, Simon
Simon.Graham at stratus.com
Mon Oct 9 20:05:07 CEST 2006
<<drbd-resync-err.patch>> Attached is a patch that adds support for
handling I/O errors during resync
as previously discussed.
Changes are:
1. New fields are added to the mdev and bm_extent structs to count the
number of
failed requests during resync - the field in bm_extent is used to
determine
when we are finished with the extent at which time it is zeroed so
that next
time we process the same extent, we'll try to resync everything
again.
2. Resync is considered done when the remaining count of block to sync
is <= the
count of failed requests.
3. When a failure occurs, a new routine, drbd_rs_failed_io() is called
to handle
this - it takes care of incrementing the failed counts and
determining if the
resync operation is now done. This is called when a NegRSDreply is
sent or
received and also when a NegAck is received for a resync operation
(this is
necessary to ensure that the SyncSource correctly knows when the
resync is done).
4. When a resync operation completes and there have been failure, the
new code
does NOT rotate the UUIDs - I felt this was correct because the
resync really
hasn't completed in this case (also, I found that if I did not do
this, the
code would end up resyncing the entire disk next time!)
I did not introduce any new states for this - let me know if you think
there needs
to be one; with this patch, we simply end up Connected and Inconsistent.
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drbd-resync-err.patch
Type: application/octet-stream
Size: 19968 bytes
Desc: drbd-resync-err.patch
Url : http://lists.linbit.com/pipermail/drbd-dev/attachments/20061009/3571fc23/drbd-resync-err-0001.obj
More information about the drbd-dev
mailing list