]> git.proxmox.com Git - proxmox-backup.git/commit
tape: move 'set_encryption' calls to the TapeDriver (and implementation)
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 22 Jan 2024 11:50:33 +0000 (12:50 +0100)
committerDominik Csapak <d.csapak@proxmox.com>
Tue, 23 Jan 2024 11:11:46 +0000 (12:11 +0100)
commita3344b8c65d8a7de0bbc03ceecd13742277edeaa
treee7248625f1d95fbefbbea57553d4f0b2c206f0e6
parentc3fcfbbda8a684376da736d4dcc5153313ebd313
tape: move 'set_encryption' calls to the TapeDriver (and implementation)

namely everytime we know what the key for the tape has to be:
* after we write the MediaSetLabel
* after reading the MediaSetLabel

When handling data on tape, we always have to have the MediaSetLabel, so
we should always trigger one of these. Because of that, we should not be
able to forget to set the encryption mode.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
(cherry picked from commit 1343dcaf011ee81941d9160e9f12e6c36ca69d50)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/api2/tape/drive.rs
src/api2/tape/restore.rs
src/tape/drive/lto/mod.rs
src/tape/drive/mod.rs
src/tape/pool_writer/mod.rs