> On Jan. 20, 2017, 2:07 p.m., James Peach wrote:
> > src/linux/fs.cpp, line 93
> > <https://reviews.apache.org/r/55713/diff/2/?file=1610379#file1610379line93>
> >
> > Should this be `stat` or `lstat`?
>
> Gilbert Song wrote:
> I did consider these two options, but they do not return a filesystem
> type and finally decided to use `statfs()`.
>
> James Peach wrote:
> Sorry what I meant was to ask whether this should follow symlinks or not?
> I think that it probably should not.
The `statfs()` follows symlinks by default, so our `fs::type()` should do the
same. The check for whether or not the parameter `path` is a symlink should be
done outside of `fs::type()`.
A side note that `statfs()` limits the number of symlinks:
```
ELOOP (statfs()) Too many symbolic links were encountered in
translating path.
```
- Gilbert
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55713/#review162511
-----------------------------------------------------------
On Jan. 20, 2017, 2:11 a.m., Gilbert Song wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55713/
> -----------------------------------------------------------
>
> (Updated Jan. 20, 2017, 2:11 a.m.)
>
>
> Review request for mesos, Avinash sridharan, Jie Yu, James Peach, Timothy
> Chen, and Jiang Yan Xu.
>
>
> Bugs: MESOS-6958
> https://issues.apache.org/jira/browse/MESOS-6958
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Get filesystem type id by using statfs() from <sys/vfs.h>.
>
>
> Diffs
> -----
>
> src/linux/fs.hpp da49c9ebfa938d169152ed3b6e4df7378711b013
> src/linux/fs.cpp 913e23317291db164fe6bdf77f3eca146dedec9b
> src/tests/containerizer/fs_tests.cpp
> ccdd5967d01abfe4fa7746e3588ff93c6e0fe7e4
>
> Diff: https://reviews.apache.org/r/55713/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Gilbert Song
>
>