public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup v2] datastore: add warning comment to unsafe function
@ 2024-07-04 11:20 Gabriel Goller
  0 siblings, 0 replies; only message in thread
From: Gabriel Goller @ 2024-07-04 11:20 UTC (permalink / raw)
  To: pbs-devel

`list_snapshots_blocking` is unsafe only to imply it's specific behavior.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 src/api2/admin/datastore.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs
index 82221c503d16..4a04d9821edd 100644
--- a/src/api2/admin/datastore.rs
+++ b/src/api2/admin/datastore.rs
@@ -458,7 +458,8 @@ pub async fn list_snapshots(
     .map_err(|err| format_err!("failed to await blocking task: {err}"))?
 }
 
-/// This must not run in a main worker thread as it potentially does tons of I/O.
+/// WARNING: Do not run in main worker thread as this potentially does a ton of I/O.
+/// This function has also been marked as `unsafe` to warn about this behavior.
 unsafe fn list_snapshots_blocking(
     store: String,
     ns: Option<BackupNamespace>,
-- 
2.43.0



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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-04 11:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-04 11:20 [pbs-devel] [PATCH proxmox-backup v2] datastore: add warning comment to unsafe function Gabriel Goller

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