Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346102
b: refs/heads/master
c: e0e1665
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent ba6349a commit 310e961
Show file tree
Hide file tree
Showing 3 changed files with 18 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: a67e1d9e8cca5e05f03a6f45c3220c6fe3adfa95
refs/heads/master: e0e1665381a519fd1f588948b1c48b5e609e336d
3 changes: 2 additions & 1 deletion trunk/drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,8 @@ static void conn_reconfig_done(struct drbd_tconn *tconn)
{
bool stop_threads;
spin_lock_irq(&tconn->req_lock);
stop_threads = conn_all_vols_unconf(tconn);
stop_threads = conn_all_vols_unconf(tconn) &&
tconn->cstate == C_STANDALONE;
spin_unlock_irq(&tconn->req_lock);
if (stop_threads) {
/* asender is implicitly stopped by receiver
Expand Down
17 changes: 15 additions & 2 deletions trunk/drivers/block/drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1491,9 +1491,15 @@ static int w_after_conn_state_ch(struct drbd_work *w, int unused)
void conn_old_common_state(struct drbd_tconn *tconn, union drbd_state *pcs, enum chg_state_flags *pf)
{
enum chg_state_flags flags = ~0;
union drbd_dev_state os, cs = {}; /* old_state, common_state */
struct drbd_conf *mdev;
int vnr, first_vol = 1;
union drbd_dev_state os, cs = {
{ .role = R_SECONDARY,
.peer = R_UNKNOWN,
.conn = tconn->cstate,
.disk = D_DISKLESS,
.pdsk = D_UNKNOWN,
} };

rcu_read_lock();
idr_for_each_entry(&tconn->volumes, mdev, vnr) {
Expand Down Expand Up @@ -1574,10 +1580,17 @@ void
conn_set_state(struct drbd_tconn *tconn, union drbd_state mask, union drbd_state val,
union drbd_state *pns_min, union drbd_state *pns_max, enum chg_state_flags flags)
{
union drbd_state ns, os, ns_max = { };
union drbd_state ns, os, ns_max = {
{ .role = R_SECONDARY,
.peer = R_UNKNOWN,
.conn = val.conn,
.disk = D_DISKLESS,
.pdsk = D_UNKNOWN
} };
union drbd_state ns_min = {
{ .role = R_MASK,
.peer = R_MASK,
.conn = val.conn,
.disk = D_MASK,
.pdsk = D_MASK
} };
Expand Down

0 comments on commit 310e961

Please sign in to comment.