[Drbd-dev] [DRBD-8.0 PATCH] Fix deadlock between transfer log and
resync
Graham, Simon
Simon.Graham at stratus.com
Fri Jan 11 16:29:57 CET 2008
The attached patches fix some deadlocks between the transfer log and
resync - when the TL is in use (previously only protocols A and B but
now all protocols), if there is a request on the TL that conflicts with
a resync region, the code would deadlock with the resync processing
waiting for the AL area to be clean and new requests that might lead to
a barrier that would clear out the TL blocked by the resync.
The attached patches include the following:
1. Non-TCQ DRBD Barrier implementation on target now flushes
disk to force cached data to disk.
2. A deadlock between resync and requests sitting in the TL
is fixed - if a resync request is started that conflicts
with entries in the TL, a DRBD barrier is initiated - this
will clear up the TL when the barrier ack is received and
allow the resync to procede.
3. When changing role from Primary, it is necessary to clear out
transfer log - do this by initiating barrier
4. When SyncTarget is also Primary, it is possible for
drbd_try_rs_begin_io
to never make progress due to entries in tl that will not be flushed.
Change code to initiate barrier IF conflict with AL is found.
(note that this change originally included the update to always use the
TL for protocol C but that was already committed to git so is not part
of this patch although the comments imply it is)
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Ensure-blocks-are-resynced-even-if-disk-cache-is-use.patch
Type: application/octet-stream
Size: 3508 bytes
Desc: 0007-Ensure-blocks-are-resynced-even-if-disk-cache-is-use.patch
Url : http://lists.linbit.com/pipermail/drbd-dev/attachments/20080111/8fdb4bf7/0007-Ensure-blocks-are-resynced-even-if-disk-cache-is-use-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Fix-more-sync-stall-cases-due-to-deadlock-between-tr.patch
Type: application/octet-stream
Size: 7292 bytes
Desc: 0008-Fix-more-sync-stall-cases-due-to-deadlock-between-tr.patch
Url : http://lists.linbit.com/pipermail/drbd-dev/attachments/20080111/8fdb4bf7/0008-Fix-more-sync-stall-cases-due-to-deadlock-between-tr-0001.obj
More information about the drbd-dev
mailing list