mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Review Request 68400: Exposed an XFS helper to find the block device for a given path.
Date Thu, 23 Aug 2018 18:57:06 GMT


> On Aug. 23, 2018, 3:29 a.m., Chun-Hung Hsiao wrote:
> > src/tests/containerizer/xfs_quota_tests.cpp
> > Line 299 (original), 302-303 (patched)
> > <https://reviews.apache.org/r/68400/diff/1/?file=2074100#file2074100line303>
> >
> >     Since these checks are not relevent to the test, would it be better to have
another unit test to verify `getDeviceForPath`?

Since `getDeviceForPath` is implicitly tested by anything that gets and sets the quota, I
didn't think it was worth a separate test case, but I did want to have a basic check for it's
behaviour.


> On Aug. 23, 2018, 3:29 a.m., Chun-Hung Hsiao wrote:
> > src/tests/containerizer/xfs_quota_tests.cpp
> > Lines 343 (patched)
> > <https://reviews.apache.org/r/68400/diff/1/?file=2074100#file2074100line344>
> >
> >     I'm a bit confused here. We created a 10MB `file` and a partially created ~1MB
`file2`, so wouldn't the total usage (`info->used`) become ~11MB? Why is `used => info->used`
true?
> 
> Chun-Hung Hsiao wrote:
>     Hmm now I got it. `mkfile` uses `::posix_fallocate`, which is an all-or-nothing operation,
so `info->used` is still 10MB. But still can you explain why you choose `EXPECT_GE`?

Yeh, I think I can replace this whole thing with
```
EXPECT_SOME_EQ(
      makeQuotaInfo(0, used),
      getProjectQuota(root, projectId));
```


- James


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


On Aug. 16, 2018, 11:52 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68400/
> -----------------------------------------------------------
> 
> (Updated Aug. 16, 2018, 11:52 p.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao, Ilya Pronin, Jie Yu, Joseph Wu, and Jiang
Yan Xu.
> 
> 
> Bugs: MESOS-5158
>     https://issues.apache.org/jira/browse/MESOS-5158
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> To manage persistent volumes in the `disk/xfs` isolator we need
> to keep track of the block device that hosts a given filesystem
> path. Expose the `getDeviceForPath` helper API to directly return
> this information.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/xfs/utils.hpp e269eb5489ceed8937775a30b3420f7960ab4cd4

>   src/slave/containerizer/mesos/isolators/xfs/utils.cpp b691c76e94f686e1a866380dca99ef0fa18e2f49

>   src/tests/containerizer/xfs_quota_tests.cpp 59ec182c1c3af3978156044f03d9e3d784d51fce

> 
> 
> Diff: https://reviews.apache.org/r/68400/diff/1/
> 
> 
> Testing
> -------
> 
> sudo make check (Fedora 28)
> 
> 
> Thanks,
> 
> James Peach
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message