Bug 316031

Summary: dm-mirror: incorrect order of mirror presuspend ops causes cluster mirror hang
Product: Red Hat Enterprise Linux 4 Reporter: Jonathan Earl Brassow <jbrassow>
Component: kernelAssignee: Jonathan Earl Brassow <jbrassow>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: high Docs Contact:
Priority: high    
Version: 4.5CC: agk, jbaron, mbroz, rkenna
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0791 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 16:33:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 358871    

Description Jonathan Earl Brassow 2007-10-02 20:24:16 UTC
Cluster mirrors do not (and can not) allow writes to mirror regions which have
not recovered yet.

When a mirror suspends it:
1) stops recovery
2) flushes the work queue (finishing outstanding writes)
3) calls log presuspend

The log has no way of knowing that the mirror is suspending until #3, so it
blocks any outstanding writes to regions that are not-in-sync.  This could hang
the mirror because recovery has been stopped and the not-in-sync regions will
never be cleared - delaying the writes indefinitely.

The solution is to switch the order of operations to:
1) stop recovery
2) call log presuspend
3) flush work queue

By doing this, the log knows that recovery has been stopped and that there will
be no collisions with writes.  Therefore, it can allow writes to regions which
have not yet been recovered.

Comment 3 Jason Baron 2007-10-03 22:35:12 UTC
committed in stream U6 build 61. A test kernel with this patch is available from
http://people.redhat.com/~jbaron/rhel4/


Comment 6 errata-xmlrpc 2007-11-15 16:33:08 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0791.html