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




src/slave/containerizer/mesos/isolators/xfs/utils.cpp
Lines 370 (patched)
<https://reviews.apache.org/r/68999/#comment293964>

    I'm planning to update this to:
    ```
    CHECK_EQ(-1, ::rename(directory.c_str(), node->fts_path));
    ```
    
    This avoids the string construction, and since we doing s `FTS_PHYSICAL` 
traversal I think that we still guarantee that we are renaming a parent to a 
child.


- James Peach


On Oct. 11, 2018, 10:23 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68999/
> -----------------------------------------------------------
> 
> (Updated Oct. 11, 2018, 10:23 p.m.)
> 
> 
> Review request for mesos, Ilya Pronin, Jie Yu, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-9300
>     https://issues.apache.org/jira/browse/MESOS-9300
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If we bind mount a directory on the same filesystem, the fts(3)
> directory traversal that recursively assigns XFS project IDs isn't
> able to detect when it crosses the mount point. This leads it to
> erroneously rewrite the project IDs for persistent volumes if they
> are bind mounted into the container by the `filesystem/linux`
> isolator. The fix is to test whether we crossed a mount point
> whenever we descend into a new directory so that we can avoid
> assigning project ID beneath it.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp 
> d5d03774b39ff6fada4a56e565d8c754790c42db 
>   src/tests/containerizer/xfs_quota_tests.cpp 
> a615ab125cd0144c5da9445468be2aaa0dc05507 
> 
> 
> Diff: https://reviews.apache.org/r/68999/diff/1/
> 
> 
> Testing
> -------
> 
> sudo make check (Fedora 28)
> 
> 
> Thanks,
> 
> James Peach
> 
>

Reply via email to