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




src/slave/containerizer/mesos/isolators/posix/disk.cpp (line 205)
<https://reviews.apache.org/r/41818/#comment177229>

    can you do the following?
    
    ```
    info->paths[path].usage = collector.usage(
        path,
        (path == info->directory) ? excludes : {}));
    ```



src/slave/containerizer/mesos/isolators/posix/disk.cpp (lines 206 - 211)
<https://reviews.apache.org/r/41818/#comment177230>

    The indentation here should be 2 because it's not method parameter.



src/slave/containerizer/mesos/isolators/posix/disk.cpp 
<https://reviews.apache.org/r/41818/#comment177231>

    Why removing this line?



src/slave/containerizer/mesos/isolators/posix/disk.cpp (line 386)
<https://reviews.apache.org/r/41818/#comment177233>

    We typically put ':' in the next line.



src/slave/containerizer/mesos/isolators/posix/disk.cpp (lines 386 - 404)
<https://reviews.apache.org/r/41818/#comment177235>

    I find it more intuitive to construct the command while creating the 
subprocess. Can you move the code there?



src/slave/containerizer/mesos/isolators/posix/disk.cpp (line 387)
<https://reviews.apache.org/r/41818/#comment177234>

    Please put `{` in a new line.



src/slave/containerizer/mesos/isolators/posix/disk.cpp (line 391)
<https://reviews.apache.org/r/41818/#comment177226>

    typo.



src/slave/containerizer/mesos/isolators/posix/disk.cpp (lines 392 - 399)
<https://reviews.apache.org/r/41818/#comment177238>

    You can just do
    ```
    foreach (const string& exclude, excludes) {
      argv.push_back("--exclude");
      argv.push_back(exclude);
    }
    ```



src/slave/containerizer/mesos/isolators/posix/disk.cpp (line 460)
<https://reviews.apache.org/r/41818/#comment177236>

    You can create the argv first based on 'path' and 'excludes' in Entry.



src/tests/containerizer/filesystem_isolator_tests.cpp (line 1065)
<https://reviews.apache.org/r/41818/#comment177240>

    Please add a short description about what this test is doing?



src/tests/containerizer/filesystem_isolator_tests.cpp (line 1120)
<https://reviews.apache.org/r/41818/#comment177242>

    Why the sleep here? This will slowdown this test by 1 seconds. If it's 
needed, definitely need some comments here.



src/tests/disk_quota_tests.cpp (lines 132 - 133)
<https://reviews.apache.org/r/41818/#comment177239>

    Can you add a simple DiskUsageCollectorTest here to test the exclude path?


- Jie Yu


On Jan. 12, 2016, 11:48 p.m., Artem Harutyunyan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41818/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2016, 11:48 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan and Jie Yu.
> 
> 
> Bugs: MESOS-4281
>     https://issues.apache.org/jira/browse/MESOS-4281
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Handled quota when volumes are bind mounted into the sandbox.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/posix/disk.hpp 
> 31808c1e8199fbf2cea36c273860fdbf0a2388f8 
>   src/slave/containerizer/mesos/isolators/posix/disk.cpp 
> 248c34adb63907911d89bed5b1519682a852bb2d 
>   src/tests/containerizer/filesystem_isolator_tests.cpp 
> 5bb85034c22caef64054c1629f6fd55d227e48b1 
>   src/tests/disk_quota_tests.cpp 1577cf71c4d1fbad11e2ec939c4ceae2d5b25f97 
> 
> Diff: https://reviews.apache.org/r/41818/diff/
> 
> 
> Testing
> -------
> 
> sudo mesos-tests.sh
> 
> 
> Thanks,
> 
> Artem Harutyunyan
> 
>

Reply via email to