public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup 1/3] ui: datastore tuning: show correct default option
@ 2022-11-28 13:26 Dominik Csapak
  2022-11-28 13:26 ` [pbs-devel] [PATCH proxmox-backup 2/3] use derive 'Default' for ChunkOrder Dominik Csapak
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dominik Csapak @ 2022-11-28 13:26 UTC (permalink / raw)
  To: pbs-devel

the default in the backend is really 'inode' not 'none', so show that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/Utils.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/Utils.js b/www/Utils.js
index 298ad084..3d51d6d2 100644
--- a/www/Utils.js
+++ b/www/Utils.js
@@ -711,7 +711,7 @@ Ext.define('PBS.Utils', {
 
     tuningOptions: {
 	'chunk-order': {
-	    '__default__': Proxmox.Utils.defaultText + ` (${gettext('None')})`,
+	    '__default__': Proxmox.Utils.defaultText + ` (${gettext('Inode')})`,
 	    none: gettext('None'),
 	    inode: gettext('Inode'),
 	},
-- 
2.30.2





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

* [pbs-devel] [PATCH proxmox-backup 2/3] use derive 'Default' for ChunkOrder
  2022-11-28 13:26 [pbs-devel] [PATCH proxmox-backup 1/3] ui: datastore tuning: show correct default option Dominik Csapak
@ 2022-11-28 13:26 ` Dominik Csapak
  2022-11-28 13:26 ` [pbs-devel] [PATCH proxmox-backup 3/3] docs: don't mention CLI only anymore for tuning options Dominik Csapak
  2022-11-28 15:00 ` [pbs-devel] applied-series: [PATCH proxmox-backup 1/3] ui: datastore tuning: show correct default option Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2022-11-28 13:26 UTC (permalink / raw)
  To: pbs-devel

instead of hardcoding the default deep inside the code. This makes it
much easier to see what is the actual default

the first instance of ChunkOrder::None was only for the test case, were
the ordering doe not matter

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 pbs-api-types/src/datastore.rs | 3 ++-
 pbs-datastore/src/datastore.rs | 5 ++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index dde385c3..d75ead90 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -158,13 +158,14 @@ pub const PRUNE_SCHEMA_KEEP_YEARLY: Schema =
         .schema();
 
 #[api]
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
 #[serde(rename_all = "lowercase")]
 /// The order to sort chunks by
 pub enum ChunkOrder {
     /// Iterate chunks in the index order
     None,
     /// Iterate chunks in inode order
+    #[default]
     Inode,
 }
 
diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index da7bdf87..73e6a3a9 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -71,7 +71,7 @@ impl DataStoreImpl {
             gc_mutex: Mutex::new(()),
             last_gc_status: Mutex::new(GarbageCollectionStatus::default()),
             verify_new: false,
-            chunk_order: ChunkOrder::None,
+            chunk_order: Default::default(),
             last_digest: None,
             sync_level: Default::default(),
         })
@@ -260,14 +260,13 @@ impl DataStore {
             DatastoreTuning::API_SCHEMA
                 .parse_property_string(config.tuning.as_deref().unwrap_or(""))?,
         )?;
-        let chunk_order = tuning.chunk_order.unwrap_or(ChunkOrder::Inode);
 
         Ok(DataStoreImpl {
             chunk_store,
             gc_mutex: Mutex::new(()),
             last_gc_status: Mutex::new(gc_status),
             verify_new: config.verify_new.unwrap_or(false),
-            chunk_order,
+            chunk_order: tuning.chunk_order.unwrap_or_default(),
             last_digest,
             sync_level: tuning.sync_level.unwrap_or_default(),
         })
-- 
2.30.2





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

* [pbs-devel] [PATCH proxmox-backup 3/3] docs: don't mention CLI only anymore for tuning options
  2022-11-28 13:26 [pbs-devel] [PATCH proxmox-backup 1/3] ui: datastore tuning: show correct default option Dominik Csapak
  2022-11-28 13:26 ` [pbs-devel] [PATCH proxmox-backup 2/3] use derive 'Default' for ChunkOrder Dominik Csapak
@ 2022-11-28 13:26 ` Dominik Csapak
  2022-11-28 15:00 ` [pbs-devel] applied-series: [PATCH proxmox-backup 1/3] ui: datastore tuning: show correct default option Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2022-11-28 13:26 UTC (permalink / raw)
  To: pbs-devel

since we now have those on the ui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 docs/storage.rst | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/docs/storage.rst b/docs/storage.rst
index 6ae5cc3a..251c11b4 100644
--- a/docs/storage.rst
+++ b/docs/storage.rst
@@ -317,8 +317,7 @@ There are a few per-datastore options:
 
 Tuning
 ^^^^^^
-There are some tuning related options for the datastore that are more advanced
-and only available on the CLI:
+There are some tuning related options for the datastore that are more advanced:
 
 * ``chunk-order``: Chunk order for verify & tape backup:
 
-- 
2.30.2





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

* [pbs-devel] applied-series: [PATCH proxmox-backup 1/3] ui: datastore tuning: show correct default option
  2022-11-28 13:26 [pbs-devel] [PATCH proxmox-backup 1/3] ui: datastore tuning: show correct default option Dominik Csapak
  2022-11-28 13:26 ` [pbs-devel] [PATCH proxmox-backup 2/3] use derive 'Default' for ChunkOrder Dominik Csapak
  2022-11-28 13:26 ` [pbs-devel] [PATCH proxmox-backup 3/3] docs: don't mention CLI only anymore for tuning options Dominik Csapak
@ 2022-11-28 15:00 ` Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2022-11-28 15:00 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dominik Csapak

Am 28/11/2022 um 14:26 schrieb Dominik Csapak:
> the default in the backend is really 'inode' not 'none', so show that
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  www/Utils.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied all three patches, thanks!




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

end of thread, other threads:[~2022-11-28 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 13:26 [pbs-devel] [PATCH proxmox-backup 1/3] ui: datastore tuning: show correct default option Dominik Csapak
2022-11-28 13:26 ` [pbs-devel] [PATCH proxmox-backup 2/3] use derive 'Default' for ChunkOrder Dominik Csapak
2022-11-28 13:26 ` [pbs-devel] [PATCH proxmox-backup 3/3] docs: don't mention CLI only anymore for tuning options Dominik Csapak
2022-11-28 15:00 ` [pbs-devel] applied-series: [PATCH proxmox-backup 1/3] ui: datastore tuning: show correct default option Thomas Lamprecht

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