diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-01-20 05:46:41 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:47:58 -0500 |
commit | cd88d030d41a9b0100fd5fee872024e6ebc8b276 (patch) | |
tree | c107e24c88fee112ebc85c966573ad51074aed7b /drivers/block | |
parent | 79a30d2d71f7be862de93228fe9b919ef664af52 (diff) |
drbd: Provide hints with the error message when clearing the sync pause flag
When the user clears the sync-pause flag, and sync stays in pause
state, give hints to the user, why it still is in pause state.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 12 |
1 files changed, 10 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; |