mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ritwik Yadav" <ritwik.ya...@gmail.com>
Subject Re: Review Request 30015: Adding methods to fetch the number of hard links associated with a path as well as the limit.
Date Thu, 22 Jan 2015 20:40:33 GMT


> On Jan. 20, 2015, 5:46 p.m., Dominic Hamon wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, line 425
> > <https://reviews.apache.org/r/30015/diff/1/?file=824530#file824530line425>
> >
> >     maybe cast the return to a size_t after checking for <0?

The return value maybe <0 in the case where no limits are enforced. Return value of -1
with errno unchanged means no limits. Return value of -1 with errno set denotes an error.


> On Jan. 20, 2015, 5:46 p.m., Dominic Hamon wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, line 416
> > <https://reviews.apache.org/r/30015/diff/1/?file=824530#file824530line416>
> >
> >     have you built and tested this on OSX? I think the behaviour is the same between
Linux and BSD (and thus OSX) but worth checking.

I have tested both of the functions that I added on Mac OSX 10.10 (Yosemite) and they work
fine.


> On Jan. 20, 2015, 5:46 p.m., Dominic Hamon wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, line 412
> > <https://reviews.apache.org/r/30015/diff/1/?file=824530#file824530line412>
> >
> >     s/long/size_t/
> >     
> >     also, be explicit in the name: numberOfLinks

I have changed the name of the functions. However, I do not understand what the string "s/long/size_t"
means? If you were suggesting that I change the return type, I have changed it to nlink_t
(__u32) which is the type which lstat function call returns.


- Ritwik


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


On Jan. 22, 2015, 8:40 p.m., Ritwik Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30015/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2015, 8:40 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Bugs: MESOS-391
>     https://issues.apache.org/jira/browse/MESOS-391
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Adding methods to fetch the number of hard links associated with a path as well as the
limit.
> It uses the lstat and pathconf system calls to get these two numbers respectively.
> This will help the garbage collector of the slave process to take the number of hard
links into account when scheduling a directory for garbage collection.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 0446f6a5d5628f8566d4cbaf33dee29b52c3c42e

> 
> Diff: https://reviews.apache.org/r/30015/diff/
> 
> 
> Testing
> -------
> 
> Build succeeds.
> 
> 
> Thanks,
> 
> Ritwik Yadav
> 
>


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