[pbs-devel] [PATCH proxmox-backup 2/2] tape: inventory: skip empty tapes
Dominik Csapak
d.csapak at proxmox.com
Tue Nov 29 11:51:27 CET 2022
tapes that are labeled into a pool but are empty, belong to the special
empty media-set. these will never have a catalog on them, so skip them
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/api2/tape/drive.rs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/api2/tape/drive.rs b/src/api2/tape/drive.rs
index 4bb9ade9..b75fb265 100644
--- a/src/api2/tape/drive.rs
+++ b/src/api2/tape/drive.rs
@@ -956,6 +956,9 @@ pub fn update_inventory(
ref pool, ref uuid, ..
}) = media_id.media_set_label
{
+ if uuid.as_ref() == EMPTY_MEDIA_SET_UUID {
+ continue;
+ }
let _pool_lock = lock_media_pool(TAPE_STATUS_DIR, pool)?;
let _lock = lock_media_set(TAPE_STATUS_DIR, uuid, None)?;
MediaCatalog::destroy_unrelated_catalog(TAPE_STATUS_DIR, &media_id)?;
--
2.30.2
More information about the pbs-devel
mailing list