> On March 19, 2016, 10:10 p.m., Jie Yu wrote:
> > src/linux/xfs.cpp, line 53
> > <https://reviews.apache.org/r/44946/diff/3/?file=1304831#file1304831line53>
> >
> >     Instead of relying on parameter, can we use os::stat::isdir here?
> 
> James Peach wrote:
>     ``isdir`` always follows symlinks. From the caller of this we always make 
> sure what kind of inode we have so we don't need to ``stat(2)`` again and 
> potentially get it wrong.
> 
> Jie Yu wrote:
>     From the API perspective, i just feel it strange that we need to pass 
> around 'isdir' which we can always derive.
>     
>     Regarding the symlink semantics, we should clearly document the semantics 
> for those public functions (i.e., do we follow symlink or not).
>     
>     I am wondering if we can do a symlink (`os::stat::islink`) check in those 
> public functions. For instance, return Nothing if 'path' passed to 
> clearProjectId is a symlink.

Yeh I can do this. We'll just end up ``stat(2)``ing the path multiple times at 
different layers.


- James


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


On March 21, 2016, 6:30 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44946/
> -----------------------------------------------------------
> 
> (Updated March 21, 2016, 6:30 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-4828
>     https://issues.apache.org/jira/browse/MESOS-4828
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add utility functions to manipulate XFS project quotas.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 9dd21b56af0500f7125b07bf535b45fe5c544aaf 
>   src/linux/xfs.hpp PRE-CREATION 
>   src/linux/xfs.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/44946/diff/
> 
> 
> Testing
> -------
> 
> Make check. Manual verification. Tests in subsequent patches.
> 
> 
> Thanks,
> 
> James Peach
> 
>

Reply via email to