Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213114
b: refs/heads/master
c: 6709893
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner committed Oct 14, 2010
1 parent 4ce861a commit caed075
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f70b3511599c49a3dc20ae349d6cdc5af47659df
refs/heads/master: 6709893059105d7859ae772af70c7db5bbab7de0
31 changes: 15 additions & 16 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,7 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
union drbd_state ns, enum chg_state_flags flags)
{
enum drbd_fencing_p fp;
enum drbd_req_event what = nothing;

if (os.conn != C_CONNECTED && ns.conn == C_CONNECTED) {
clear_bit(CRASHED_PRIMARY, &mdev->flags);
Expand All @@ -1234,21 +1235,14 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,

if (os.susp && ns.susp && mdev->sync_conf.on_no_data == OND_SUSPEND_IO) {
if (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED) {
if (ns.conn == C_CONNECTED) {
spin_lock_irq(&mdev->req_lock);
_tl_restart(mdev, resend);
_drbd_set_state(_NS(mdev, susp, 0), CS_VERBOSE, NULL);
spin_unlock_irq(&mdev->req_lock);
} else /* ns.conn > C_CONNECTED */
if (ns.conn == C_CONNECTED)
what = resend;
else /* ns.conn > C_CONNECTED */
dev_err(DEV, "Unexpected Resynd going on!\n");
}

if (os.disk == D_ATTACHING && ns.disk > D_ATTACHING) {
spin_lock_irq(&mdev->req_lock);
_tl_restart(mdev, restart_frozen_disk_io);
_drbd_set_state(_NS(mdev, susp, 0), CS_VERBOSE, NULL);
spin_unlock_irq(&mdev->req_lock);
}
if (os.disk == D_ATTACHING && ns.disk > D_ATTACHING)
what = restart_frozen_disk_io;
}

if (fp == FP_STONITH && ns.susp) {
Expand All @@ -1267,12 +1261,17 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
/* case2: The connection was established again: */
if (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED) {
clear_bit(NEW_CUR_UUID, &mdev->flags);
spin_lock_irq(&mdev->req_lock);
_tl_restart(mdev, resend);
_drbd_set_state(_NS(mdev, susp, 0), CS_VERBOSE, NULL);
spin_unlock_irq(&mdev->req_lock);
what = resend;
}
}

if (what != nothing) {
spin_lock_irq(&mdev->req_lock);
_tl_restart(mdev, what);
_drbd_set_state(_NS(mdev, susp, 0), CS_VERBOSE, NULL);
spin_unlock_irq(&mdev->req_lock);
}

/* Do not change the order of the if above and the two below... */
if (os.pdsk == D_DISKLESS && ns.pdsk > D_DISKLESS) { /* attach on the peer */
drbd_send_uuids(mdev);
Expand Down

0 comments on commit caed075

Please sign in to comment.