> On Jan. 25, 2016, 4:36 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/posix/disk.cpp, line 205
> > <https://reviews.apache.org/r/41818/diff/4/?file=1195103#file1195103line205>
> >
> > can you do the following?
> >
> > ```
> > info->paths[path].usage = collector.usage(
> > path,
> > (path == info->directory) ? excludes : {}));
> > ```
`{}` causes a compilation error, but I did re-introduce the ternary operator
back.
> On Jan. 25, 2016, 4:36 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/posix/disk.cpp, line 388
> > <https://reviews.apache.org/r/41818/diff/4/?file=1195103#file1195103line388>
> >
> > Please put `{` in a new line.
The body of the constructor is empty again so `{}` will remain on the same line.
> On Jan. 25, 2016, 4:36 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/posix/disk.cpp, lines 393-400
> > <https://reviews.apache.org/r/41818/diff/4/?file=1195103#file1195103line393>
> >
> > You can just do
> > ```
> > foreach (const string& exclude, excludes) {
> > argv.push_back("--exclude");
> > argv.push_back(exclude);
> > }
> > ```
Thanks! This looks much nicer.
> On Jan. 25, 2016, 4:36 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/posix/disk.cpp, line 461
> > <https://reviews.apache.org/r/41818/diff/4/?file=1195103#file1195103line461>
> >
> > You can create the argv first based on 'path' and 'excludes' in Entry.
I am not sure I understand this one.
- Artem
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41818/#review116224
-----------------------------------------------------------
On Jan. 26, 2016, 12:13 a.m., Artem Harutyunyan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41818/
> -----------------------------------------------------------
>
> (Updated Jan. 26, 2016, 12:13 a.m.)
>
>
> Review request for 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
>
>