Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346152
b: refs/heads/master
c: 6ab9b1b
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent fea2c8e commit cce00f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: b8853dbd8c6410d1faef2785e8ee4c990b068a77
refs/heads/master: 6ab9b1b60b1854bf5fe68ecd51cb9550c67801ec
9 changes: 6 additions & 3 deletions trunk/drivers/block/drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,9 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
"ASSERT FAILED: disk is %s during detach\n",
drbd_disk_str(mdev->state.disk));

drbd_send_state(mdev, ns);
if (ns.conn >= C_CONNECTED)
drbd_send_state(mdev, ns);

drbd_rs_cancel_all(mdev);

/* In case we want to get something to stable storage still,
Expand Down Expand Up @@ -1353,14 +1355,15 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
mdev->rs_failed = 0;
atomic_set(&mdev->rs_pending_cnt, 0);

drbd_send_state(mdev, ns);
if (ns.conn >= C_CONNECTED)
drbd_send_state(mdev, ns);
/* corresponding get_ldev in __drbd_set_state
* this may finally trigger drbd_ldev_destroy. */
put_ldev(mdev);
}

/* Notify peer that I had a local IO error, and did not detached.. */
if (os.disk == D_UP_TO_DATE && ns.disk == D_INCONSISTENT)
if (os.disk == D_UP_TO_DATE && ns.disk == D_INCONSISTENT && ns.conn >= C_CONNECTED)
drbd_send_state(mdev, ns);

/* Disks got bigger while they were detached */
Expand Down

0 comments on commit cce00f6

Please sign in to comment.