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 d1004c5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@ 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 d1004c5

Please sign in to comment.