From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Cc: w.bumiller@proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] sync: make LocalSourceReader snapshot lock non-pub
Date: Mon, 29 Sep 2025 11:21:39 +0200 [thread overview]
Message-ID: <20250929092143.190162-1-f.gruenbichler@proxmox.com> (raw)
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
next reply other threads:[~2025-09-29 9:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-29 9:21 Fabian Grünbichler [this message]
2025-09-29 15:56 ` Christian Ebner
2025-09-30 8:47 ` [pbs-devel] applied: " Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250929092143.190162-1-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=w.bumiller@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.