Skip to content

Commit

Permalink
Add optional merge field to FilesystemSave metadata
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Jul 23, 2024
1 parent 96d94c4 commit bde85e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/engine/strat_engine/serde_structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ pub struct FilesystemSave {
pub fs_size_limit: Option<Sectors>,
#[serde(skip_serializing_if = "Option::is_none")]
pub origin: Option<FilesystemUuid>,
// if self.origin is None, then self.merge must be None
// if self.origin is Some,
// then self.merge is None is equivalent to self.merge is Some(false)
// this definition is fully backward compatible.
// TODO: This data type should no longer be optional in Stratis 4.0
#[serde(skip_serializing_if = "Option::is_none")]
pub merge: Option<bool>,
}

#[cfg(test)]
Expand Down
1 change: 1 addition & 0 deletions src/engine/strat_engine/thinpool/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ impl StratFilesystem {
created: self.created.timestamp() as u64,
fs_size_limit: self.size_limit,
origin: self.origin,
merge: None,
}
}

Expand Down

0 comments on commit bde85e6

Please sign in to comment.