You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2017/10/23 04:43:31 UTC
Review Request 63212: Added a findByTarget method for
fs::MountInfoTable.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63212/
-----------------------------------------------------------
Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
Bugs: MESOS-7306
https://issues.apache.org/jira/browse/MESOS-7306
Repository: mesos
Description
-------
This method allows us to get the mount table entry that contains the
specified target.
Diffs
-----
src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9
src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de
Diff: https://reviews.apache.org/r/63212/diff/1/
Testing
-------
Thanks,
Jie Yu
Re: Review Request 63212: Added a findByTarget method for
fs::MountInfoTable.
Posted by Gilbert Song <so...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63212/#review192080
-----------------------------------------------------------
Ship it!
Ship It!
- Gilbert Song
On Nov. 27, 2017, 4:28 p.m., Jie Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63212/
> -----------------------------------------------------------
>
> (Updated Nov. 27, 2017, 4:28 p.m.)
>
>
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
>
>
> Bugs: MESOS-7306
> https://issues.apache.org/jira/browse/MESOS-7306
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This method allows us to get the mount table entry that contains the
> specified target.
>
>
> Diffs
> -----
>
> src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9
> src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de
> src/tests/containerizer/fs_tests.cpp 1022b824045dc8fb6f8bfeb5f7b0dee95c82ff6c
>
>
> Diff: https://reviews.apache.org/r/63212/diff/4/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Jie Yu
>
>
Re: Review Request 63212: Added a findByTarget method for
fs::MountInfoTable.
Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63212/
-----------------------------------------------------------
(Updated Nov. 28, 2017, 12:28 a.m.)
Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
Changes
-------
Fix a comment.
Bugs: MESOS-7306
https://issues.apache.org/jira/browse/MESOS-7306
Repository: mesos
Description
-------
This method allows us to get the mount table entry that contains the
specified target.
Diffs (updated)
-----
src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9
src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de
src/tests/containerizer/fs_tests.cpp 1022b824045dc8fb6f8bfeb5f7b0dee95c82ff6c
Diff: https://reviews.apache.org/r/63212/diff/4/
Changes: https://reviews.apache.org/r/63212/diff/3-4/
Testing
-------
Thanks,
Jie Yu
Re: Review Request 63212: Added a findByTarget method for
fs::MountInfoTable.
Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63212/
-----------------------------------------------------------
(Updated Nov. 27, 2017, 11:18 p.m.)
Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
Changes
-------
Addressed comments from James and add tests.
Bugs: MESOS-7306
https://issues.apache.org/jira/browse/MESOS-7306
Repository: mesos
Description
-------
This method allows us to get the mount table entry that contains the
specified target.
Diffs (updated)
-----
src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9
src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de
src/tests/containerizer/fs_tests.cpp 1022b824045dc8fb6f8bfeb5f7b0dee95c82ff6c
Diff: https://reviews.apache.org/r/63212/diff/3/
Changes: https://reviews.apache.org/r/63212/diff/2-3/
Testing
-------
Thanks,
Jie Yu
Re: Review Request 63212: Added a findByTarget method for
fs::MountInfoTable.
Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63212/
-----------------------------------------------------------
(Updated Nov. 27, 2017, 4:49 a.m.)
Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
Changes
-------
rebased.
Bugs: MESOS-7306
https://issues.apache.org/jira/browse/MESOS-7306
Repository: mesos
Description
-------
This method allows us to get the mount table entry that contains the
specified target.
Diffs (updated)
-----
src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9
src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de
Diff: https://reviews.apache.org/r/63212/diff/2/
Changes: https://reviews.apache.org/r/63212/diff/1-2/
Testing
-------
Thanks,
Jie Yu
Re: Review Request 63212: Added a findByTarget method for
fs::MountInfoTable.
Posted by Jie Yu <yu...@gmail.com>.
> On Oct. 25, 2017, 9:26 p.m., James Peach wrote:
> > src/linux/fs.cpp
> > Lines 249 (patched)
> > <https://reviews.apache.org/r/63212/diff/1/?file=1865622#file1865622line249>
> >
> > So if the target was "/mnt/foobar" and we had a mount called "/mnt/foo", this would match? Is that what we want here?
Good catch! Fixed.
- Jie
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63212/#review189120
-----------------------------------------------------------
On Nov. 27, 2017, 11:18 p.m., Jie Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63212/
> -----------------------------------------------------------
>
> (Updated Nov. 27, 2017, 11:18 p.m.)
>
>
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
>
>
> Bugs: MESOS-7306
> https://issues.apache.org/jira/browse/MESOS-7306
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This method allows us to get the mount table entry that contains the
> specified target.
>
>
> Diffs
> -----
>
> src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9
> src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de
> src/tests/containerizer/fs_tests.cpp 1022b824045dc8fb6f8bfeb5f7b0dee95c82ff6c
>
>
> Diff: https://reviews.apache.org/r/63212/diff/3/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Jie Yu
>
>
Re: Review Request 63212: Added a findByTarget method for
fs::MountInfoTable.
Posted by Jie Yu <yu...@gmail.com>.
> On Oct. 25, 2017, 9:26 p.m., James Peach wrote:
> > src/linux/fs.cpp
> > Lines 257 (patched)
> > <https://reviews.apache.org/r/63212/diff/1/?file=1865622#file1865622line257>
> >
> > Did you consider using a `Result` and returning `None()` in this case?
I think not found is really not possible because `/` is always at the root.
- Jie
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63212/#review189120
-----------------------------------------------------------
On Nov. 27, 2017, 4:49 a.m., Jie Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63212/
> -----------------------------------------------------------
>
> (Updated Nov. 27, 2017, 4:49 a.m.)
>
>
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
>
>
> Bugs: MESOS-7306
> https://issues.apache.org/jira/browse/MESOS-7306
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This method allows us to get the mount table entry that contains the
> specified target.
>
>
> Diffs
> -----
>
> src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9
> src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de
>
>
> Diff: https://reviews.apache.org/r/63212/diff/2/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Jie Yu
>
>
Re: Review Request 63212: Added a findByTarget method for
fs::MountInfoTable.
Posted by Jie Yu <yu...@gmail.com>.
> On Oct. 25, 2017, 9:26 p.m., James Peach wrote:
> > src/linux/fs.hpp
> > Lines 276 (patched)
> > <https://reviews.apache.org/r/63212/diff/1/?file=1865621#file1865621line276>
> >
> > Not "immediate parent", but longest match right?
It's more complicated than that. I think the goal is to find the mount table entry that contains the given target (similar to `findmnt --target [TARGET]`).
- Jie
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63212/#review189120
-----------------------------------------------------------
On Nov. 27, 2017, 4:49 a.m., Jie Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63212/
> -----------------------------------------------------------
>
> (Updated Nov. 27, 2017, 4:49 a.m.)
>
>
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
>
>
> Bugs: MESOS-7306
> https://issues.apache.org/jira/browse/MESOS-7306
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This method allows us to get the mount table entry that contains the
> specified target.
>
>
> Diffs
> -----
>
> src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9
> src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de
>
>
> Diff: https://reviews.apache.org/r/63212/diff/2/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Jie Yu
>
>
Re: Review Request 63212: Added a findByTarget method for
fs::MountInfoTable.
Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63212/#review189120
-----------------------------------------------------------
src/linux/fs.hpp
Lines 276 (patched)
<https://reviews.apache.org/r/63212/#comment266048>
Not "immediate parent", but longest match right?
src/linux/fs.cpp
Lines 236 (patched)
<https://reviews.apache.org/r/63212/#comment266050>
Can you add some tests to `tests/containerizer/fs_tests.cpp`?
src/linux/fs.cpp
Lines 249 (patched)
<https://reviews.apache.org/r/63212/#comment266049>
So if the target was "/mnt/foobar" and we had a mount called "/mnt/foo", this would match? Is that what we want here?
src/linux/fs.cpp
Lines 257 (patched)
<https://reviews.apache.org/r/63212/#comment266047>
Did you consider using a `Result` and returning `None()` in this case?
- James Peach
On Oct. 23, 2017, 4:43 a.m., Jie Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63212/
> -----------------------------------------------------------
>
> (Updated Oct. 23, 2017, 4:43 a.m.)
>
>
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
>
>
> Bugs: MESOS-7306
> https://issues.apache.org/jira/browse/MESOS-7306
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This method allows us to get the mount table entry that contains the
> specified target.
>
>
> Diffs
> -----
>
> src/linux/fs.hpp cbc8bf79083ce2bc34fa698808eaf92764a577a9
> src/linux/fs.cpp 40c31a3ad2ccbeb59868c5e2d7b1809c613da8de
>
>
> Diff: https://reviews.apache.org/r/63212/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Jie Yu
>
>