tape/pool_writer: give proper types to 'contains_snapshot'

instead of a string. The underlying catalog implementation has to
care about how this is formatted, not the external caller

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2022-05-16 13:36:09 +02:00
committed by Fabian Grünbichler
parent 789e22d905
commit 8bec3ff691
4 changed files with 41 additions and 11 deletions

View File

@ -496,7 +496,11 @@ fn backup_worker(
if let Some(info) = snapshot_list.pop() {
let rel_path =
print_ns_and_snapshot(info.backup_dir.backup_ns(), info.backup_dir.as_ref());
if pool_writer.contains_snapshot(datastore_name, &rel_path) {
if pool_writer.contains_snapshot(
datastore_name,
&info.backup_dir.backup_ns(),
info.backup_dir.as_ref(),
) {
task_log!(worker, "skip snapshot {}", rel_path);
continue;
}
@ -517,7 +521,11 @@ fn backup_worker(
let rel_path =
print_ns_and_snapshot(info.backup_dir.backup_ns(), info.backup_dir.as_ref());
if pool_writer.contains_snapshot(datastore_name, &rel_path) {
if pool_writer.contains_snapshot(
datastore_name,
&info.backup_dir.backup_ns(),
info.backup_dir.as_ref(),
) {
task_log!(worker, "skip snapshot {}", rel_path);
continue;
}