[pve-devel] [PATCH pve-installer 2/6] common: use get_min_disks as single source of truth for RAID config checks

Michael Köppl m.koeppl at proxmox.com
Mon Apr 28 17:36:06 CEST 2025


On 4/28/25 13:48, Christoph Heiss wrote:
>>
>>   proxmox-installer-common/src/disk_checks.rs | 18 ++++--------------
>>   1 file changed, 4 insertions(+), 14 deletions(-)
>>
>> diff --git a/proxmox-installer-common/src/disk_checks.rs b/proxmox-installer-common/src/disk_checks.rs
>> index ecc43bd..1d17e2c 100644
>> --- a/proxmox-installer-common/src/disk_checks.rs
>> +++ b/proxmox-installer-common/src/disk_checks.rs
>> @@ -69,17 +69,16 @@ pub fn check_zfs_raid_config(level: ZfsRaidLevel, disks: &[Disk]) -> Result<(),
> 
> While looking at all the disks checks, most of them could be made
> methods of the respective enum, e.g. so one could do something like
> `ZfsRaidLevel::Raid1.check_disks(disks)`.
> 
> What do you think? Would be a nice cleanup (via a separate series would
> also be okay, of course).

I think it's a good idea, already working on it. I'll add it to the v2. 
Thanks for the suggestion!




More information about the pve-devel mailing list