* [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
* Re: [pbs-devel] [PATCH proxmox-backup] sync: make LocalSourceReader snapshot lock non-pub
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
1 sibling, 0 replies; 3+ messages in thread
From: Christian Ebner @ 2025-09-29 15:56 UTC (permalink / raw)
To: Fabian Grünbichler, pbs-devel; +Cc: w.bumiller
Thanks for safeguarding this, most likely saved us from future troubles.
Changes look good to me!
Consider:
Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
_______________________________________________
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
* [pbs-devel] applied: [PATCH proxmox-backup] sync: make LocalSourceReader snapshot lock non-pub
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 ` Fabian Grünbichler
1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2025-09-30 8:47 UTC (permalink / raw)
To: pbs-devel, Fabian Grünbichler
On Mon, 29 Sep 2025 11:21:39 +0200, Fabian Grünbichler wrote:
> 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.
>
>
Applied with Chris' R-b, thanks!
[1/1] sync: make LocalSourceReader snapshot lock non-pub
commit: 1aa7d29782f2270cc00bae01ad32b6211653c806
Best regards,
--
Fabian Grünbichler <f.gruenbichler@proxmox.com>
_______________________________________________
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 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.