]> git.proxmox.com Git - qemu-server.git/commit
drive-mirror : wait that busy eq false before block-job-complete
authorAlexandre Derumier <aderumier@odiso.com>
Fri, 7 Nov 2014 09:10:48 +0000 (10:10 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 7 Nov 2014 14:28:13 +0000 (15:28 +0100)
commitab6ecffe53a1d045dc03d2f9cf56037a8a2a9b2a
treecd917e20afd3f0c2b64a764194be6cf58057a7d2
parent5fe03fd8eebb0fcc8a70d89f3810535fb2d42ec9
drive-mirror : wait that busy eq false before block-job-complete

When the drive-mirror is at 100%, and write occurs, the busy flag can change from false->true

- 100% no new writes

transferred: 1073741824 bytes remaining: 0 bytes total: 1073741824 bytes progression: 100.00 % busy: false
transferred: 1073741824 bytes remaining: 0 bytes total: 1073741824 bytes progression: 100.00 % busy: false
transferred: 1073741824 bytes remaining: 0 bytes total: 1073741824 bytes progression: 100.00 % busy: false

- 100% new writes

transferred: 1073741824 bytes remaining: 0 bytes total: 1073741824 bytes progression: 100.00 % busy: true
transferred: 1073741824 bytes remaining: 0 bytes total: 1073741824 bytes progression: 100.00 % busy: true
transferred: 1073741824 bytes remaining: 0 bytes total: 1073741824 bytes progression: 100.00 % busy: true

- 100% no new writes

transferred: 1073741824 bytes remaining: 0 bytes total: 1073741824 bytes progression: 100.00 % busy: false
transferred: 1073741824 bytes remaining: 0 bytes total: 1073741824 bytes progression: 100.00 % busy: false
transferred: 1073741824 bytes remaining: 0 bytes total: 1073741824 bytes progression: 100.00 % busy: false

So, we need to check that busy is false before doing the block-job-complete.

Also, we force the vm to pause, if it's busy for more than 120s when drive-mirror is at 100%

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/QemuServer.pm