Skip to content

Commit

Permalink
Actually write global recompression configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nabijaczleweli committed Dec 13, 2024
1 parent 5ef051d commit 0007613
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,24 @@ pub fn run_device_setup(device: Option<Device>, device_name: &str) -> Result<()>
})?,
}
}
if !device
.compression_algorithms
.recompression_global
.is_empty()
{
match fs::write(
device_sysfs_path.join("recompress"),
&device.compression_algorithms.recompression_global,
) {
Ok(_) => {}
Err(err) => {
warn!(
"Warning: configuring global recompression with {:?} failed: {}",
device.compression_algorithms.recompression_global, err,
);
}
}
}

if let Some(ref wb_dev) = device.writeback_dev {
let writeback_path = device_sysfs_path.join("backing_dev");
Expand Down

0 comments on commit 0007613

Please sign in to comment.