aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_state.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-03-28 10:48:11 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:45:03 -0500
commit2aebfabb17ecc434623732896a5834a9cb82a82d (patch)
tree4570cd92a9f257ee8255f076bd0ca48014dd738e /drivers/block/drbd/drbd_state.c
parent78bae59b1b7bc06c84e292e9ecf42c013723e057 (diff)
drbd: Renamed id_susp(union drbd_state s) to drbd_suspended(struct drbd_conf *)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_state.c')
-rw-r--r--drivers/block/drbd/drbd_state.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c
index 411d05f885e1..ae4a76ce8c1d 100644
--- a/drivers/block/drbd/drbd_state.c
+++ b/drivers/block/drbd/drbd_state.c
@@ -47,6 +47,11 @@ static enum drbd_state_rv is_valid_transition(union drbd_state os, union drbd_st
47static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state ns, 47static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state ns,
48 const char **warn_sync_abort); 48 const char **warn_sync_abort);
49 49
50static inline bool is_susp(union drbd_state s)
51{
52 return s.susp || s.susp_nod || s.susp_fen;
53}
54
50bool conn_all_vols_unconf(struct drbd_tconn *tconn) 55bool conn_all_vols_unconf(struct drbd_tconn *tconn)
51{ 56{
52 struct drbd_conf *mdev; 57 struct drbd_conf *mdev;
@@ -1161,7 +1166,7 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
1161 if (get_ldev(mdev)) { 1166 if (get_ldev(mdev)) {
1162 if ((ns.role == R_PRIMARY || ns.peer == R_PRIMARY) && 1167 if ((ns.role == R_PRIMARY || ns.peer == R_PRIMARY) &&
1163 mdev->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) { 1168 mdev->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) {
1164 if (is_susp(mdev->state)) { 1169 if (drbd_suspended(mdev)) {
1165 set_bit(NEW_CUR_UUID, &mdev->flags); 1170 set_bit(NEW_CUR_UUID, &mdev->flags);
1166 } else { 1171 } else {
1167 drbd_uuid_new_current(mdev); 1172 drbd_uuid_new_current(mdev);