Skip to content

Commit

Permalink
Remove obsolete parameter
Browse files Browse the repository at this point in the history
stratisd never uses it anymore, not since the size of the MDV was
increased.

Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Nov 28, 2023
1 parent 8c3a8d3 commit 1133c67
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
10 changes: 1 addition & 9 deletions src/engine/strat_engine/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,7 @@ fn get_clevis_executable(name: &str) -> StratisResult<PathBuf> {

/// Create a filesystem on devnode. If uuid specified, set the UUID of the
/// filesystem on creation. If 'noalign', set the noalign option.
/// NOTE: It used to be desirable to set the noalign option when creating the
/// MDV, because it was very small; since then the size of the MDV has been
/// increased, and it is no longer necessary to pass the noalign option when
/// creating the MDV.
pub fn create_fs(devnode: &Path, uuid: Option<StratisUuid>, noalign: bool) -> StratisResult<()> {
pub fn create_fs(devnode: &Path, uuid: Option<StratisUuid>) -> StratisResult<()> {
let mut command = Command::new(get_executable(MKFS_XFS).as_os_str());
command.arg("-f");
command.arg("-q");
Expand All @@ -248,10 +244,6 @@ pub fn create_fs(devnode: &Path, uuid: Option<StratisUuid>, noalign: bool) -> St
command.arg("-m");
command.arg(format!("uuid={uuid}"));
}
if noalign {
command.arg("-d");
command.arg("noalign");
}
execute_cmd(&mut command)
}

Expand Down
2 changes: 1 addition & 1 deletion src/engine/strat_engine/liminal/identify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ mod tests {
}

for path in paths {
create_fs(path, None, false).unwrap();
create_fs(path, None).unwrap();
let device_path = DevicePath::new(path).expect("our test path");
assert_eq!(
block_device_apply(&device_path, process_stratis_device)
Expand Down
2 changes: 1 addition & 1 deletion src/engine/strat_engine/thinpool/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl StratFilesystem {
let mut thin_dev =
ThinDev::new(get_dm(), &dm_name, Some(&dm_uuid), size, thinpool_dev, id)?;

if let Err(err) = create_fs(&thin_dev.devnode(), Some(StratisUuid::Fs(fs_uuid)), false) {
if let Err(err) = create_fs(&thin_dev.devnode(), Some(StratisUuid::Fs(fs_uuid))) {
if let Err(err2) = retry_with_index(Fixed::from_millis(100).take(4), |i| {
trace!(
"Cleanup new thin device after failed create_fs() attempt {}",
Expand Down
2 changes: 1 addition & 1 deletion src/engine/strat_engine/thinpool/mdv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl MetadataVol {

/// Initialize a new Metadata Volume.
pub fn initialize(pool_uuid: PoolUuid, dev: LinearDev) -> StratisResult<MetadataVol> {
create_fs(&dev.devnode(), Some(StratisUuid::Pool(pool_uuid)), false)?;
create_fs(&dev.devnode(), Some(StratisUuid::Pool(pool_uuid)))?;
MetadataVol::setup(pool_uuid, dev)
}

Expand Down

0 comments on commit 1133c67

Please sign in to comment.