mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
blkio: Add support for customized-attributes
Customized attributes are useful for customized kernels Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
@@ -613,6 +613,15 @@ pub struct BlkIoResources {
|
||||
pub throttle_write_bps_device: Vec<BlkIoDeviceThrottleResource>,
|
||||
/// Throttled write IO operations per second can be provided for each device.
|
||||
pub throttle_write_iops_device: Vec<BlkIoDeviceThrottleResource>,
|
||||
|
||||
/// Customized key-value attributes
|
||||
/// # Usage:
|
||||
/// ```
|
||||
/// let resource = &mut cgroups_rs::Resources::default();
|
||||
/// resource.blkio.attrs.insert("io.cost.weight".to_string(), "10".to_string());
|
||||
/// // apply here
|
||||
/// ```
|
||||
pub attrs: HashMap<String, String>,
|
||||
}
|
||||
|
||||
/// The resource limits and constraints that will be set on the control group.
|
||||
|
||||
Reference in New Issue
Block a user