mount: prefer boot disk ESP and run cargo fmt

* choose ESP matching the primary data disk when multiple ESPs exist,
  falling back gracefully for single-disk layouts
* keep new helper to normalize device names and reuse the idempotent
  mount logic
* apply cargo fmt across the tree
This commit is contained in:
2025-10-10 14:49:39 +02:00
parent 5746e285b2
commit 3d14f77516
23 changed files with 447 additions and 263 deletions

View File

@@ -15,15 +15,15 @@
// - Keep field names and enums stable; update docs/SCHEMA.md when public surface changes.
// REGION: RESPONSIBILITIES-END
use serde::{Deserialize, Serialize};
use clap::ValueEnum;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct LoggingConfig {
/// Log level: "error" | "warn" | "info" | "debug"
pub level: String, // default "info"
pub level: String, // default "info"
/// When true, also log to /run/zosstorage/zosstorage.log
pub to_file: bool, // default false
pub to_file: bool, // default false
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -55,7 +55,11 @@ pub enum Topology {
#[value(alias = "ssd-hdd-bcachefs")]
SsdHddBcachefs,
/// Multi-device bcachefs with two replicas (data+metadata).
#[value(alias = "bcachefs2-copy", alias = "bcachefs-2copy", alias = "bcachefs-2-copy")]
#[value(
alias = "bcachefs2-copy",
alias = "bcachefs-2copy",
alias = "bcachefs-2-copy"
)]
Bcachefs2Copy,
/// Optional mirrored btrfs across two disks when explicitly requested.
#[value(alias = "btrfs-raid1")]
@@ -205,4 +209,4 @@ pub struct Config {
pub mount: MountScheme,
/// Report output configuration.
pub report: ReportOptions,
}
}