mirror of https://github.com/schoebel/mars
light: make detach/down more robust against following commands
Immediately stop syncing when rource should go down.
This commit is contained in:
parent
9e54983283
commit
4e17138003
|
@ -3665,6 +3665,11 @@ static int make_sync(void *buf, struct mars_dent *dent)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Don't try syncing detached resources
|
||||||
|
*/
|
||||||
|
if (do_start && !_check_allow(global, dent->d_parent, "attach"))
|
||||||
|
do_start = false;
|
||||||
|
|
||||||
/* Disallow contemporary sync & logfile_apply
|
/* Disallow contemporary sync & logfile_apply
|
||||||
*/
|
*/
|
||||||
if (do_start &&
|
if (do_start &&
|
||||||
|
|
|
@ -1248,6 +1248,8 @@ sub attach_res_phase2 {
|
||||||
check_status($cmd, $res, "is-attached", $detach ? 0 : 1, 1);
|
check_status($cmd, $res, "is-attached", $detach ? 0 : 1, 1);
|
||||||
if ($detach) {
|
if ($detach) {
|
||||||
check_mars_device($cmd, $res, 1, 1);
|
check_mars_device($cmd, $res, 1, 1);
|
||||||
|
check_status($cmd, $res, "is-replaying", 0, 1);
|
||||||
|
check_status($cmd, $res, "is-syncing", 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue