Skip to content

Commit

Permalink
fix nvpair type of invalid_features (openzfs#250)
Browse files Browse the repository at this point in the history
The kernel expects the "invalid_features" to be a NvList-type nvpair,
but we are passing a StringArray-type, resulting in a kernel panic.
This commit changes it to return a NvList.
  • Loading branch information
ahrens authored Mar 9, 2022
1 parent 6d9cce8 commit e411ef7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/zfs_object_agent/zettaobject/src/root_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl RootConnectionState {
hostname: String,
},
Feature {
invalid_features: Vec<String>,
invalid_features: HashMap<String, String>,
can_readonly: bool,
},
Io {
Expand All @@ -208,7 +208,10 @@ impl RootConnectionState {
features,
can_readonly,
})) => Err(Failure::Feature {
invalid_features: features.into_iter().map(|feature| feature.name).collect(),
invalid_features: features
.into_iter()
.map(|feature| (feature.name, "".to_string()))
.collect(),
can_readonly,
}),
Err(PoolOpenError::Get(e)) => {
Expand Down

0 comments on commit e411ef7

Please sign in to comment.