Add support for blkio.weight_device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
This commit is contained in:
parent
d88f338f8c
commit
ed4e505639
3 changed files with 29 additions and 3 deletions
15
blkiodev/blkiodev.go
Normal file
15
blkiodev/blkiodev.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package blkiodev
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// WeightDevice is a structure that hold device:weight pair
|
||||
type WeightDevice struct {
|
||||
Path string
|
||||
Weight uint16
|
||||
}
|
||||
|
||||
func (w *WeightDevice) String() string {
|
||||
return fmt.Sprintf("%s:%d", w.Path, w.Weight)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue