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 368F71FF0E0 for ; Thu, 23 Jul 2026 13:52:46 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 069052138E; Thu, 23 Jul 2026 13:52:46 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [PATCH proxmox-backup v3 04/10] datastore: restrict chunk store scope to pbs-datastore crate From: Robert Obkircher To: Christian Ebner In-Reply-To: <20260721103643.333028-5-c.ebner@proxmox.com> References: <20260721103643.333028-1-c.ebner@proxmox.com> <20260721103643.333028-5-c.ebner@proxmox.com> Date: Thu, 23 Jul 2026 13:52:10 +0200 Message-Id: <178480753020.88450.7667298984460177219.b4-review@b4> X-Mailer: b4 0.16-dev X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784807502962 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.189 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_LOW -0.7 Sender listed at https://www.dnswl.org/, low 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: XVRGSG2AU7JOQTK5ZUGRSKCXPUNLSH5E X-Message-ID-Hash: XVRGSG2AU7JOQTK5ZUGRSKCXPUNLSH5E X-MailFrom: r.obkircher@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 CC: pbs-devel@lists.proxmox.com 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: > For better organization of the locking related helpers. This constant > is used in various places for locking, therefore move it to the more > fitting central crate lib. > > No functional changes. > > Signed-off-by: Christian Ebner > > diff --git a/pbs-datastore/src/backup_info.rs b/pbs-datastore/src/backup_info.rs > index 8abeeb2ea..fbef8e85a 100644 > --- a/pbs-datastore/src/backup_info.rs > +++ b/pbs-datastore/src/backup_info.rs > @@ -24,9 +24,8 @@ use crate::datastore::{GROUP_NOTES_FILE_NAME, GROUP_OWNER_FILE_NAME}; > use crate::manifest::{BackupManifest, MANIFEST_LOCK_NAME}; > use crate::move_journal; > use crate::s3::S3_CONTENT_PREFIX; > -use crate::{DataBlob, DataStore, DatastoreBackend}; > +use crate::{DATASTORE_LOCKS_DIR, DataBlob, DataStore, DatastoreBackend}; > > -pub const DATASTORE_LOCKS_DIR: &str = "/run/proxmox-backup/locks"; > pub const PROTECTED_MARKER_FILENAME: &str = ".protected"; > > proxmox_schema::const_regex! { > diff --git a/pbs-datastore/src/chunk_store.rs b/pbs-datastore/src/chunk_store.rs > index d3faf1214..cfd920dea 100644 > --- a/pbs-datastore/src/chunk_store.rs > +++ b/pbs-datastore/src/chunk_store.rs > @@ -18,12 +18,11 @@ use proxmox_sys::process_locker::{ > }; > use proxmox_worker_task::WorkerTaskContext; > > -use crate::backup_info::DATASTORE_LOCKS_DIR; > use crate::data_blob::DataChunkBuilder; > use crate::file_formats::{ > COMPRESSED_BLOB_MAGIC_1_0, ENCRYPTED_BLOB_MAGIC_1_0, UNCOMPRESSED_BLOB_MAGIC_1_0, > }; > -use crate::{DataBlob, LocalDatastoreLruCache}; > +use crate::{DATASTORE_LOCKS_DIR, DataBlob, LocalDatastoreLruCache}; > > const USING_MARKER_FILENAME_EXT: &str = "using"; > > diff --git a/pbs-datastore/src/lib.rs b/pbs-datastore/src/lib.rs > index f522fadf7..0904d7da2 100644 > --- a/pbs-datastore/src/lib.rs > +++ b/pbs-datastore/src/lib.rs > @@ -162,6 +162,8 @@ pub const ACTIVE_OPERATIONS_DIR: &str = concat!( > pbs_buildcfg::PROXMOX_BACKUP_RUN_DIR_M!(), > "/active-operations" > ); > +/// Base path for datastore related file locks. > +pub const DATASTORE_LOCKS_DIR: &str = "/run/proxmox-backup/locks"; I think this could be limited to pub(crate). -- Robert Obkircher