From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id EAFCF1FF0B6 for ; Thu, 12 Nov 2026 10:15:21 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 7A37321620; Thu, 12 Nov 2026 10:15:21 +0100 (CET) Message-ID: Date: Thu, 12 Nov 2026 10:15:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH proxmox-backup v2] tape: virtual drive: fix endless recursion in changer status To: Jakob-Tobias Winter , pbs-devel@lists.proxmox.com References: <20261111204853.531985-2-tobias@stuttgart.de> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <20261111204853.531985-2-tobias@stuttgart.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794474912119 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.415 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: ZLOBXPAQ2NNBKK7D3JF5PUKZFAMIEFIL X-Message-ID-Hash: ZLOBXPAQ2NNBKK7D3JF5PUKZFAMIEFIL X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 11/11/26 9:49 PM, Jakob-Tobias Winter wrote: > The virtual tape drive, which exists for tests and debugging only, also > acts as its own changer and reports every virtual tape in its directory > as a slot. To build that status it asks for the list of online media. > The drive has its own way to get that list, the tapes in its directory, > but that was kept next to the changer interface instead of being part of > it. So the status got the generic variant of the list, which is derived > from the changer status. The two called each other until the stack > overflowed, and every operation that needs the changer status of a > virtual drive, like loading or unloading a tape, crashed the process. > > Make the list of tapes in the directory the variant that the changer > interface of the virtual drive provides, so that it replaces the generic > one for the status and for loading a tape from a slot. > > Fixes: 46a1863f8 ("tape: improve MediaChange trait") > Suggested-by: Christian Ebner > Signed-off-by: Jakob-Tobias Winter Thanks for the revised version of the patch! This is the correct approach for the fix and matches what I've come up with during review of version 1. Reviewed-by: Christian Ebner Tested-by: Christian Ebner