Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345972
b: refs/heads/master
c: 8e0af25
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent f55cf72 commit cbb4035
Show file tree
Hide file tree
Showing 3 changed files with 13 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: 2aebfabb17ecc434623732896a5834a9cb82a82d
refs/heads/master: 8e0af25fa85c9efe393128b0a0dd874981edb22f
10 changes: 9 additions & 1 deletion trunk/drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,9 @@ struct drbd_tconn { /* is a resource from the config file */
struct list_head all_tconn; /* linked on global drbd_tconns */
struct idr volumes; /* <tconn, vnr> to mdev mapping */
enum drbd_conns cstate; /* Only C_STANDALONE to C_WF_REPORT_PARAMS */
unsigned susp:1; /* IO suspended by user */
unsigned susp_nod:1; /* IO suspended because no data */
unsigned susp_fen:1; /* IO suspended because fence peer handler runs */
struct mutex cstate_mutex; /* Protects graceful disconnects */

unsigned long flags;
Expand Down Expand Up @@ -1687,6 +1690,9 @@ static inline union drbd_state drbd_read_state(struct drbd_conf *mdev)
union drbd_state rv;

rv = mdev->state;
rv.susp = mdev->tconn->susp;
rv.susp_nod = mdev->tconn->susp_nod;
rv.susp_fen = mdev->tconn->susp_fen;

return rv;
}
Expand Down Expand Up @@ -2219,7 +2225,9 @@ static inline int drbd_state_is_stable(struct drbd_conf *mdev)

static inline int drbd_suspended(struct drbd_conf *mdev)
{
return mdev->state.susp || mdev->state.susp_nod || mdev->state.susp_fen;
struct drbd_tconn *tconn = mdev->tconn;

return tconn->susp || tconn->susp_fen || tconn->susp_nod;
}

static inline bool may_inc_ap_bio(struct drbd_conf *mdev)
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/block/drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,9 @@ __drbd_set_state(struct drbd_conf *mdev, union drbd_state ns,
atomic_inc(&mdev->local_cnt);

mdev->state = ns;
mdev->tconn->susp = ns.susp;
mdev->tconn->susp_nod = ns.susp_nod;
mdev->tconn->susp_fen = ns.susp_fen;

/* solve the race between becoming unconfigured,
* worker doing the cleanup, and
Expand Down

0 comments on commit cbb4035

Please sign in to comment.