49f9aca627
by checking the 'checked_chunks' before trying to write to disk and by doing the existance check in the parallel handler. This way, we do not have to check the existance of a chunk multiple times (if multiple source datastores gets restored to the same target datastore) and also we do not have to wait on the stat before reading the next chunk. We have to change the &WorkerTask to an Arc though, otherwise we cannot log to the worker from the parallel handler Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>