aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/drbd/drbd_nl.c12
-rw-r--r--include/linux/drbd.h2
2 files changed, 12 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 434b621f76a9..ffe3a97fef9b 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -1952,9 +1952,17 @@ static int drbd_nl_resume_sync(struct drbd_conf *mdev, struct drbd_nl_cfg_req *n
1952 struct drbd_nl_cfg_reply *reply) 1952 struct drbd_nl_cfg_reply *reply)
1953{ 1953{
1954 int retcode = NO_ERROR; 1954 int retcode = NO_ERROR;
1955 union drbd_state s;
1955 1956
1956 if (drbd_request_state(mdev, NS(user_isp, 0)) == SS_NOTHING_TO_DO) 1957 if (drbd_request_state(mdev, NS(user_isp, 0)) == SS_NOTHING_TO_DO) {
1957 retcode = ERR_PAUSE_IS_CLEAR; 1958 s = mdev->state;
1959 if (s.conn == C_PAUSED_SYNC_S || s.conn == C_PAUSED_SYNC_T) {
1960 retcode = s.aftr_isp ? ERR_PIC_AFTER_DEP :
1961 s.peer_isp ? ERR_PIC_PEER_DEP : ERR_PAUSE_IS_CLEAR;
1962 } else {
1963 retcode = ERR_PAUSE_IS_CLEAR;
1964 }
1965 }
1958 1966
1959 reply->ret_code = retcode; 1967 reply->ret_code = retcode;
1960 return 0; 1968 return 0;
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index d10431fab004..ba5c785d3f7d 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -153,6 +153,8 @@ enum drbd_ret_code {
153 ERR_NEED_APV_93 = 153, 153 ERR_NEED_APV_93 = 153,
154 ERR_STONITH_AND_PROT_A = 154, 154 ERR_STONITH_AND_PROT_A = 154,
155 ERR_CONG_NOT_PROTO_A = 155, 155 ERR_CONG_NOT_PROTO_A = 155,
156 ERR_PIC_AFTER_DEP = 156,
157 ERR_PIC_PEER_DEP = 157,
156 158
157 /* insert new ones above this line */ 159 /* insert new ones above this line */
158 AFTER_LAST_ERR_CODE 160 AFTER_LAST_ERR_CODE