Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345861
b: refs/heads/master
c: d0456c7
h: refs/heads/master
i:
  345859: ad72ed5
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Nov 3, 2012
1 parent e451c62 commit 77b0b1a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 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: 543cc10b4cc5c60aa9fcc62705ccfb9998bf4697
refs/heads/master: d0456c72df5fb3b800ba9b0ec2465fdbcaf29a7f
16 changes: 7 additions & 9 deletions trunk/drivers/block/drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,18 @@ static enum drbd_state_rv is_valid_transition(union drbd_state os, union drbd_st
static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state ns,
const char **warn_sync_abort);

int conn_all_vols_unconf(struct drbd_tconn *tconn)
bool conn_all_vols_unconf(struct drbd_tconn *tconn)
{
struct drbd_conf *mdev;
int minor, uncfg = 1;
int minor;

idr_for_each_entry(&tconn->volumes, mdev, minor) {
uncfg &= (mdev->state.disk == D_DISKLESS &&
mdev->state.conn == C_STANDALONE &&
mdev->state.role == R_SECONDARY);
if (!uncfg)
break;
if (mdev->state.disk != D_DISKLESS ||
mdev->state.conn != C_STANDALONE ||
mdev->state.role != R_SECONDARY)
return false;
}

return uncfg;
return true;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/block/drbd/drbd_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ conn_request_state(struct drbd_tconn *tconn, union drbd_state mask, union drbd_s
enum chg_state_flags flags);

extern void drbd_resume_al(struct drbd_conf *mdev);
extern int conn_all_vols_unconf(struct drbd_tconn *tconn);
extern bool conn_all_vols_unconf(struct drbd_tconn *tconn);

/**
* drbd_request_state() - Reqest a state change
Expand Down

0 comments on commit 77b0b1a

Please sign in to comment.