----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/74872/#review226223 -----------------------------------------------------------
src/linux/cgroups2.hpp Lines 33-41 (patched) <https://reviews.apache.org/r/74872/#comment314469> The terminology here is a bit confusing: mount_or_create seems to actually be semantically something like get_or_mount or mount_if_absent. In terms of api design, it's a bit unfortunate that the only two options provided are to mount, or to mount if absent. I would have expected a way for the caller to be able to do a read-only lookup too, e.g. ``` Try<string> find_mount(); Try<Nothing> mount(string path); ``` With only these two functions the caller can still accomplish mount_if_absent themselves, but they can also do a read-only locating of the mount if you only want to detect and use the existing one on the system. - Benjamin Mahler On Feb. 12, 2024, 5:04 p.m., Devin Leamy wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/74872/ > ----------------------------------------------------------- > > (Updated Feb. 12, 2024, 5:04 p.m.) > > > Review request for mesos. > > > Repository: mesos > > > Description > ------- > > Introduces: > - `cgroups2::mount()`: Mount a cgroup2 hierarchy. > - `cgroups2::mount_or_create()`: Mount a cgroup2 hierarchy or use an > existing hierarchy if one is available. > - `cgroups2::unmount()`: Unmount the cgroup2 hierarchy, if it was not > pre-existing. > - `cgroups2::cleanup()`: Unmount the cgroup2 hierarchy and cleanup > cgroups2. Does nothing if no hierarchy is mounted. > > The mount point is stored in a global variable that is set and unset by > the `mount()`, `mountOrCreate()`, and `unmount()` methods. > > > Diffs > ----- > > src/linux/cgroups2.hpp PRE-CREATION > src/linux/cgroups2.cpp PRE-CREATION > > > Diff: https://reviews.apache.org/r/74872/diff/1/ > > > Testing > ------- > > > Thanks, > > Devin Leamy > >
