From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id C66441FF15F for ; Mon, 26 Aug 2024 16:04:39 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 469C814361; Mon, 26 Aug 2024 16:05:05 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Mon, 26 Aug 2024 16:04:59 +0200 Message-Id: <20240826140459.2550345-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pbs-devel] [PATCH proxmox-backup] tape: fix read element status for some changers X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" It seems some changers are setting the PVolTag/AVolTag flags in the ELEMENT STATUS page response, but don't include the actual fields then. To make it work with such changers, downgrade the errors to warnings, so we can continue to decode the remaining data. This is OK since one volume tag is optional and the other is skipped anyway. Reported in the forum: https://forum.proxmox.com/threads/hpe-storeonce-vtl.152547/ Signed-off-by: Dominik Csapak --- pbs-tape/src/sg_pt_changer.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pbs-tape/src/sg_pt_changer.rs b/pbs-tape/src/sg_pt_changer.rs index b600a49d..940eed4a 100644 --- a/pbs-tape/src/sg_pt_changer.rs +++ b/pbs-tape/src/sg_pt_changer.rs @@ -746,9 +746,18 @@ fn decode_element_status_page( let desc: TransportDescriptor = unsafe { reader.read_be_value()? }; let full = (desc.flags1 & 1) != 0; - let volume_tag = subhead.parse_optional_volume_tag(&mut reader, full)?; - subhead.skip_alternate_volume_tag(&mut reader)?; + let volume_tag = match subhead.parse_optional_volume_tag(&mut reader, full) { + Ok(tag) => tag, + Err(err) => { + log::warn!("could not read optional volume tag: {err}"); + None + } + }; + + if let Err(err) = subhead.skip_alternate_volume_tag(&mut reader) { + log::warn!("could not skip alternate volume tag: {err}"); + } result.last_element_address = Some(desc.element_address); -- 2.39.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel