Skip to content

Commit 21aa6b2

Browse files
committed
Put fs type in rtmr3 event log
1 parent d0e1b3f commit 21aa6b2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

dstack-util/src/system_setup.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use std::{
66
collections::{BTreeMap, BTreeSet},
7+
fmt::Display,
78
ops::Deref,
89
path::{Path, PathBuf},
910
process::Command,
@@ -86,6 +87,15 @@ enum FsType {
8687
Ext4,
8788
}
8889

90+
impl Display for FsType {
91+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
92+
match self {
93+
FsType::Zfs => write!(f, "zfs"),
94+
FsType::Ext4 => write!(f, "ext4"),
95+
}
96+
}
97+
}
98+
8999
impl FromStr for FsType {
90100
type Err = anyhow::Error;
91101
fn from_str(s: &str) -> Result<Self, Self::Err> {
@@ -754,6 +764,7 @@ impl<'a> Stage0<'a> {
754764

755765
// Parse kernel command line options
756766
let opts = parse_dstack_options(&self.shared).context("Failed to parse kernel cmdline")?;
767+
extend_rtmr3("storage-fs", opts.storage_fs.to_string().as_bytes())?;
757768
info!(
758769
"Filesystem options: encryption={}, filesystem={:?}",
759770
opts.storage_encrypted, opts.storage_fs

0 commit comments

Comments
 (0)