Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309327
b: refs/heads/master
c: 4afc433
h: refs/heads/master
i:
  309325: 88a0429
  309323: 0872dc9
  309319: 09b12ce
  309311: ed54160
v: v3
  • Loading branch information
Philipp Reisner committed May 9, 2012
1 parent a90f2e3 commit f07c5d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 545752d5d8a2e01b4fcb23a61ec732b2b26cbe1a
refs/heads/master: 4afc433cf8066c112bd2bdd949d78ff8e8b4ba3f
11 changes: 6 additions & 5 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1612,8 +1612,8 @@ 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));

if (drbd_send_state(mdev, ns))
dev_info(DEV, "Notified peer that I am detaching my disk\n");
if (ns.conn >= C_CONNECTED)
drbd_send_state(mdev, ns);

drbd_rs_cancel_all(mdev);

Expand Down Expand Up @@ -1642,15 +1642,16 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
mdev->rs_failed = 0;
atomic_set(&mdev->rs_pending_cnt, 0);

if (drbd_send_state(mdev, ns))
dev_info(DEV, "Notified peer that I'm now diskless.\n");
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 f07c5d5

Please sign in to comment.