all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH installer] tui: bootdisk zfs config: add a maximum value to the `copies` option
@ 2023-11-17 16:32 Stefan Sterz
  2023-11-17 16:41 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Sterz @ 2023-11-17 16:32 UTC (permalink / raw)
  To: pve-devel

according to `man zfsprops` the copies option can only be 1, 2, or 3.
limit the field to 3, as setting higher options can't work anyway.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
---
i would have added a `min_value` of 1 too, but `IntegerEditView` is
based on `NumericEditView` and that doesn't offer a minimal value.

 proxmox-tui-installer/src/views/bootdisk.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxmox-tui-installer/src/views/bootdisk.rs b/proxmox-tui-installer/src/views/bootdisk.rs
index 00e6ade..7e13e91 100644
--- a/proxmox-tui-installer/src/views/bootdisk.rs
+++ b/proxmox-tui-installer/src/views/bootdisk.rs
@@ -592,7 +592,7 @@ impl ZfsBootdiskOptionsView {
                             .unwrap_or_default(),
                     ),
             )
-            .child("copies", IntegerEditView::new().content(options.copies))
+            .child("copies", IntegerEditView::new().content(options.copies).max_value(3))
             .child_conditional(
                 is_pve,
                 "ARC max size",
--
2.39.2





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

* [pve-devel] applied: [PATCH installer] tui: bootdisk zfs config: add a maximum value to the `copies` option
  2023-11-17 16:32 [pve-devel] [PATCH installer] tui: bootdisk zfs config: add a maximum value to the `copies` option Stefan Sterz
@ 2023-11-17 16:41 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-11-17 16:41 UTC (permalink / raw)
  To: Proxmox VE development discussion, Stefan Sterz

Am 17/11/2023 um 17:32 schrieb Stefan Sterz:
> according to `man zfsprops` the copies option can only be 1, 2, or 3.
> limit the field to 3, as setting higher options can't work anyway.
> 
> Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
> ---
> i would have added a `min_value` of 1 too, but `IntegerEditView` is
> based on `NumericEditView` and that doesn't offer a minimal value.
> 
>  proxmox-tui-installer/src/views/bootdisk.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, fleeced in a note that we already limit that in the GTK UI
(for the exact reason you reference), thanks!




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

end of thread, other threads:[~2023-11-17 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-17 16:32 [pve-devel] [PATCH installer] tui: bootdisk zfs config: add a maximum value to the `copies` option Stefan Sterz
2023-11-17 16:41 ` [pve-devel] applied: " Thomas Lamprecht

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal