public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] sync: make LocalSourceReader snapshot lock non-pub
@ 2025-09-29  9:21 Fabian Grünbichler
  2025-09-29 15:56 ` Christian Ebner
  2025-09-30  8:47 ` [pbs-devel] applied: " Fabian Grünbichler
  0 siblings, 2 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2025-09-29  9:21 UTC (permalink / raw)
  To: pbs-devel; +Cc: w.bumiller

this field is just there to hold the actual lock guard, but accidentally using
it would potentially problematic (if holding the Mutex across an await point),
so let's not expose it in the first place.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
found while going through std::sync::Mutex usage combined with S3

 src/server/sync.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/server/sync.rs b/src/server/sync.rs
index 50e41ae5c..514e82132 100644
--- a/src/server/sync.rs
+++ b/src/server/sync.rs
@@ -107,7 +107,8 @@ pub(crate) struct RemoteSourceReader {
 }
 
 pub(crate) struct LocalSourceReader {
-    pub(crate) _dir_lock: Arc<Mutex<BackupLockGuard>>,
+    // must not be accessed/made pub, this is just a hack for Send+Sync
+    _dir_lock: Arc<Mutex<BackupLockGuard>>,
     pub(crate) path: PathBuf,
     pub(crate) datastore: Arc<DataStore>,
 }
-- 
2.47.3



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-30  8:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-29  9:21 [pbs-devel] [PATCH proxmox-backup] sync: make LocalSourceReader snapshot lock non-pub Fabian Grünbichler
2025-09-29 15:56 ` Christian Ebner
2025-09-30  8:47 ` [pbs-devel] applied: " Fabian Grünbichler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal