all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/2] tape: inventory: skip empty tapes
Date: Tue, 29 Nov 2022 11:51:27 +0100	[thread overview]
Message-ID: <20221129105127.1969525-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20221129105127.1969525-1-d.csapak@proxmox.com>

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@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





  reply	other threads:[~2022-11-29 10:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 10:51 [pbs-devel] [PATCH proxmox-backup 1/2] tape: refactor uuid of empty media set into constant Dominik Csapak
2022-11-29 10:51 ` Dominik Csapak [this message]
2022-11-29 12:03 ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221129105127.1969525-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal