aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_int.h')
-rw-r--r--drivers/block/drbd/drbd_int.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index eb1273d04caf..ff7fffa00dac 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -1681,6 +1681,8 @@ void drbd_bcast_ee(struct drbd_conf *mdev,
1681#define susp_MASK 1 1681#define susp_MASK 1
1682#define user_isp_MASK 1 1682#define user_isp_MASK 1
1683#define aftr_isp_MASK 1 1683#define aftr_isp_MASK 1
1684#define susp_nod_MASK 1
1685#define susp_fen_MASK 1
1684 1686
1685#define NS(T, S) \ 1687#define NS(T, S) \
1686 ({ union drbd_state mask; mask.i = 0; mask.T = T##_MASK; mask; }), \ 1688 ({ union drbd_state mask; mask.i = 0; mask.T = T##_MASK; mask; }), \
@@ -2254,11 +2256,16 @@ static inline int drbd_state_is_stable(union drbd_state s)
2254 return 1; 2256 return 1;
2255} 2257}
2256 2258
2259static inline int is_susp(union drbd_state s)
2260{
2261 return s.susp || s.susp_nod || s.susp_fen;
2262}
2263
2257static inline int __inc_ap_bio_cond(struct drbd_conf *mdev) 2264static inline int __inc_ap_bio_cond(struct drbd_conf *mdev)
2258{ 2265{
2259 int mxb = drbd_get_max_buffers(mdev); 2266 int mxb = drbd_get_max_buffers(mdev);
2260 2267
2261 if (mdev->state.susp) 2268 if (is_susp(mdev->state))
2262 return 0; 2269 return 0;
2263 if (test_bit(SUSPEND_IO, &mdev->flags)) 2270 if (test_bit(SUSPEND_IO, &mdev->flags))
2264 return 0; 2271 return 0;