-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libct/cg: mv fscommon.{Open,Read,Write}File to cgroups #3024
Conversation
From one thing, this is a public API that we'd rather not change after 1.0, so it's better to change in before, and there is no functional change here, so it's relatively safe to merge. OTOH I don't like moving things around right before a release. |
Found two existing users of the functionality that is being moved:
So I think we should do the change before 1.0 and I will help these two packages to adopt accordingly. |
(split into two commits; testing the first one thus draft for now) |
This is a better place as cgroups itself is using these. Should help with moving more stuff common in between fs and fs2 to fscommon. Looks big, but this is just moving the code around: fscommon/{fscommon,open}.go -> cgroups/file.go fscommon/fscommon_test.go -> cgroups/file_test.go and fixes for TestMode moved to a different package. There's no functional change. Signed-off-by: Kir Kolyshkin <[email protected]>
Yet better, I have added the backward-compatible aliases and marked them as deprecated, so there's no breakage plus a hint from a linter to switch to new names. |
OTOH that means we don't have to change before 1.0, although it's still better to do it before. |
... and switch to using the ones from cgroups. Signed-off-by: Kir Kolyshkin <[email protected]>
This is a better place as cgroups itself is using these.
Should help with moving more stuff common in between fs and fs2 to
fscommon. For example, it should help #2883 to have RDMA code
common between fs and fs2 in fscommon (see discussion at
#2883 (comment))
Looks big, but this is just moving the implementation of
fscommon.{Open,Read,Write}File
and its test case to
cgroups
pkg:There's no functional change.
Signed-off-by: Kir Kolyshkin [email protected]