Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242878
b: refs/heads/master
c: 06d33e9
h: refs/heads/master
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Mar 10, 2011
1 parent 01ccbfd commit 7605d5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 418e0a927d520f9c8e875ea75abee35d93a0f1b3
refs/heads/master: 06d33e968d2c58143a7aaafa8963cf6a58099467
8 changes: 6 additions & 2 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,11 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
put_ldev(mdev);
}

if (os.role == R_PRIMARY && ns.role == R_SECONDARY && get_ldev(mdev)) {
/* Write out all changed bits on demote.
* Though, no need to da that just yet
* if there is a resync going on still */
if (os.role == R_PRIMARY && ns.role == R_SECONDARY &&
mdev->state.conn <= C_CONNECTED && get_ldev(mdev)) {
drbd_bitmap_io_from_worker(mdev, &drbd_bm_write, "demote");
put_ldev(mdev);
}
Expand Down Expand Up @@ -1559,7 +1563,7 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
if (os.disk < D_UP_TO_DATE && os.conn >= C_SYNC_SOURCE && ns.conn == C_CONNECTED)
drbd_send_state(mdev);

if (os.conn > C_CONNECTED && ns.conn == C_CONNECTED)
if (os.conn > C_CONNECTED && ns.conn <= C_CONNECTED)
drbd_queue_bitmap_io(mdev, &drbd_bm_write, NULL, "write from resync_finished");

/* free tl_hash if we Got thawed and are C_STANDALONE */
Expand Down

0 comments on commit 7605d5c

Please sign in to comment.