You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
@@ -1952,9 +1952,17 @@ static int drbd_nl_resume_sync(struct drbd_conf *mdev, struct drbd_nl_cfg_req *n
|
||||
struct drbd_nl_cfg_reply *reply)
|
||||
{
|
||||
int retcode = NO_ERROR;
|
||||
union drbd_state s;
|
||||
|
||||
if (drbd_request_state(mdev, NS(user_isp, 0)) == SS_NOTHING_TO_DO)
|
||||
retcode = ERR_PAUSE_IS_CLEAR;
|
||||
if (drbd_request_state(mdev, NS(user_isp, 0)) == SS_NOTHING_TO_DO) {
|
||||
s = mdev->state;
|
||||
if (s.conn == C_PAUSED_SYNC_S || s.conn == C_PAUSED_SYNC_T) {
|
||||
retcode = s.aftr_isp ? ERR_PIC_AFTER_DEP :
|
||||
s.peer_isp ? ERR_PIC_PEER_DEP : ERR_PAUSE_IS_CLEAR;
|
||||
} else {
|
||||
retcode = ERR_PAUSE_IS_CLEAR;
|
||||
}
|
||||
}
|
||||
|
||||
reply->ret_code = retcode;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user