]> git.proxmox.com Git - proxmox-backup.git/commit
tape/restore: optimize chunk restore behaviour
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 4 May 2021 10:21:47 +0000 (12:21 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 4 May 2021 11:06:31 +0000 (13:06 +0200)
commit49f9aca627a0404e4da09f55c7877abbf9888469
treee1289843b2fcface76cbcc6bf302d05d802fb138
parent4cba875379d2874a12a037bf5e52c0a1e5eed9f6
tape/restore: optimize chunk restore behaviour

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>
src/api2/tape/drive.rs
src/api2/tape/restore.rs