runc update: support per-device weight and iops by kolyshkin · Pull Request #4775 · opencontainers/runc (original) (raw)
kolyshkin marked this pull request as ready for review
This support was missing from runc, and thus the example from the podman-update wasn't working.
To fix, introduce a function to either update or insert new weights and iops.
Add integration tests.
Signed-off-by: Kir Kolyshkin kolyshkin@gmail.com
In case there's a duplicate in the device list, the latter entry overrides the former one.
So, we need to modify the last entry, not the first one. To do that, use slices.Backward.
Amend the test case to test the fix.
Reported-by: lifubang lifubang@acmcoder.com Signed-off-by: Kir Kolyshkin kolyshkin@gmail.com
rata approved these changes Jun 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})