-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75113/#review226725
-----------------------------------------------------------


Ship it!





src/slave/containerizer/device_manager/device_manager.cpp
Lines 348-364 (patched)
<https://reviews.apache.org/r/75113/#comment315005>

    let's use lambdas here


- Benjamin Mahler


On July 26, 2024, 6:04 p.m., Jason Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75113/
> -----------------------------------------------------------
> 
> (Updated July 26, 2024, 6:04 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> A device access is granted if it is encompassed by an allow entry and
> does not have access overlaps with any deny entry.
> 
> The current process of manually checking if a device access would be
> granted given a state is tedious and leads to worse readability.
> 
> A new helper function is added to check if an entry would be granted
> access in a CgroupDeviceAccess instance, and requires the state to be
> normalized.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/device_manager/device_manager.hpp 
> 7c8523d8bdddb8e95c47e1812b48520296680ad6 
>   src/slave/containerizer/device_manager/device_manager.cpp 
> 4c9b86393f0809e08d79b6354940826bd56116f2 
>   src/tests/device_manager_tests.cpp 54d464e97c8fd179128239a6757b16dfa0147c54 
> 
> 
> Diff: https://reviews.apache.org/r/75113/diff/1/
> 
> 
> Testing
> -------
> 
> Added tests for is_access_granted, tests pass.
> 
> 
> Thanks,
> 
> Jason Zhou
> 
>

Reply via email to