From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 888AED4BA for ; Wed, 30 Nov 2022 17:33:07 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6586921251 for ; Wed, 30 Nov 2022 17:32:37 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 30 Nov 2022 17:32:36 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 90A0344B2C for ; Wed, 30 Nov 2022 17:32:36 +0100 (CET) Message-ID: <49a2df97-dc87-8398-6567-5df274b49705@proxmox.com> Date: Wed, 30 Nov 2022 17:32:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Thunderbird/108.0 Content-Language: en-GB To: Proxmox Backup Server development discussion , Dominik Csapak References: <20221129141701.4109478-1-d.csapak@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20221129141701.4109478-1-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.029 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] applied-series: [PATCH proxmox-backup v2 1/2] tape: hide internal use of all zero uuid for unassigned tapes 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: , X-List-Received-Date: Wed, 30 Nov 2022 16:33:07 -0000 Am 29/11/2022 um 15:17 schrieb Dominik Csapak: > a tape assigned to a pool but no media-set, gets the special 'all zero' > media set in it's MediaSetLabel. Instead of having that constant > scattered all over the code, hide this fact by using wrapper functions > to initialize it that way and to check for it > > Signed-off-by: Dominik Csapak > --- > replaces my previous patch: > tape: refactor uuid of empty media set into constant > > src/api2/tape/drive.rs | 6 +++--- > src/api2/tape/media.rs | 3 +-- > src/tape/file_formats/mod.rs | 8 ++++++++ > src/tape/inventory.rs | 26 +++++++++++--------------- > src/tape/media_pool.rs | 2 +- > 5 files changed, 24 insertions(+), 21 deletions(-) > > applied both patches, thanks! ps. I like those commit subjects/messages, many thanks for making my work slightly easier (it adds up).