File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ type LinuxContainer interface {
3030 GetLinuxResources () * nri.LinuxResources
3131 GetOOMScoreAdj () * int
3232 GetCgroupsPath () string
33+ GetIOPriority () * nri.LinuxIOPriority
3334}
3435
3536func containerToNRI (ctr Container ) * nri.Container {
Original file line number Diff line number Diff line change @@ -15,5 +15,6 @@ func linuxContainerToNRI(ctr Container) *nri.LinuxContainer {
1515 Resources : lnx .GetLinuxResources (),
1616 OomScoreAdj : nri .Int (lnx .GetOOMScoreAdj ()),
1717 CgroupsPath : lnx .GetCgroupsPath (),
18+ IoPriority : lnx .GetIOPriority (),
1819 }
1920}
Original file line number Diff line number Diff line change @@ -771,6 +771,15 @@ func (c *criContainer) GetCgroupsPath() string {
771771 return c .GetSpec ().Linux .CgroupsPath
772772}
773773
774+ func (c * criContainer ) GetIOPriority () * api.LinuxIOPriority {
775+ spec := c .GetSpec ()
776+ if spec .Process == nil {
777+ return nil
778+ }
779+
780+ return api .FromOCILinuxIOPriority (spec .Process .IOPriority )
781+ }
782+
774783func (c * criContainer ) GetSpec () * rspec.Spec {
775784 if c .spec != nil {
776785 return c .spec
You can’t perform that action at this time.
0 commit comments