Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213103
b: refs/heads/master
c: 18a50fa
h: refs/heads/master
i:
  213101: 951de26
  213099: b896811
  213095: 6e76ff4
  213087: f6707b1
v: v3
  • Loading branch information
Philipp Reisner committed Oct 14, 2010
1 parent 1621259 commit e5f5fe5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 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: 894c6a946199cf91e52bc1864c3dc6529cceb3db
refs/heads/master: 18a50fa213d46d5592f6542c91ab4c4760cf346c
4 changes: 3 additions & 1 deletion trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,8 +1297,10 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
}

if (ns.pdsk < D_INCONSISTENT && get_ldev(mdev)) {
if (ns.peer == R_PRIMARY && mdev->ldev->md.uuid[UI_BITMAP] == 0)
if (ns.peer == R_PRIMARY && mdev->ldev->md.uuid[UI_BITMAP] == 0) {
drbd_uuid_new_current(mdev);
drbd_send_uuids(mdev);
}

/* D_DISKLESS Peer becomes secondary */
if (os.peer == R_PRIMARY && ns.peer == R_SECONDARY)
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3104,6 +3104,11 @@ static int receive_uuids(struct drbd_conf *mdev, struct p_header *h)
drbd_md_sync(mdev);
}
put_ldev(mdev);
} else if (mdev->state.disk < D_INCONSISTENT &&
mdev->state.role == R_PRIMARY) {
/* I am a diskless primary, the peer just created a new current UUID
for me. */
drbd_set_ed_uuid(mdev, p_uuid[UI_CURRENT]);
}

/* Before we test for the disk state, we should wait until an eventually
Expand Down

0 comments on commit e5f5fe5

Please sign in to comment.