public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox v3 1/7] pbs-api-types: derive FromStr for DatastoreTuning parsing
Date: Tue, 12 May 2026 15:10:41 +0200	[thread overview]
Message-ID: <20260512131047.689089-2-c.ebner@proxmox.com> (raw)
In-Reply-To: <20260512131047.689089-1-c.ebner@proxmox.com>

Facilitates parsing of the datastore tuning options for PBS.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 pbs-api-types/src/datastore.rs | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index 098d2b7c..8d50e7ae 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -307,6 +307,16 @@ pub struct DatastoreTuning {
     pub default_verification_readers: Option<usize>,
 }
 
+impl FromStr for DatastoreTuning {
+    type Err = Error;
+
+    fn from_str(s: &str) -> Result<Self, Self::Err> {
+        let tuning: DatastoreTuning =
+            proxmox_schema::property_string::parse_with_schema(s, &DatastoreTuning::API_SCHEMA)?;
+        Ok(tuning)
+    }
+}
+
 pub const DATASTORE_TUNING_STRING_SCHEMA: Schema = StringSchema::new("Datastore tuning options")
     .format(&ApiStringFormat::PropertyString(
         &DatastoreTuning::API_SCHEMA,
-- 
2.47.3





  reply	other threads:[~2026-05-12 13:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 13:10 [PATCH proxmox{,-backup} v3 0/7] fix sync level updates for chunk store Christian Ebner
2026-05-12 13:10 ` Christian Ebner [this message]
2026-05-12 13:10 ` [PATCH proxmox-backup v3 2/7] datastore: GC: avoid double parsing of datastore tuning options Christian Ebner
2026-05-12 13:10 ` [PATCH proxmox-backup v3 3/7] pbs-config/datastore: add common helper for parsing " Christian Ebner
2026-05-12 13:10 ` [PATCH proxmox-backup v3 4/7] datastore: restrict chunk store mutex scope to crate only Christian Ebner
2026-05-12 13:10 ` [PATCH proxmox-backup v3 5/7] datastore: avoid useless double borrowing of datastore Christian Ebner
2026-05-12 13:10 ` [PATCH proxmox-backup v3 6/7] datastore: move try_ensure_sync_level() implementation to chunk store Christian Ebner
2026-05-12 13:10 ` [PATCH proxmox-backup v3 7/7] datastore: fix sync level update propagation " Christian Ebner

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=20260512131047.689089-2-c.ebner@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.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 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