----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30015/#review73076 -----------------------------------------------------------
Nice, can you split the patches for `lstat` and `pathconf` please? It will be easier to land them that way. :) 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp <https://reviews.apache.org/r/30015/#comment119273> We generally do not pass a raw pointer like this, where the caller must de-allocate it from inside the Try (that's pretty tricky). Can you introduce an os::FileStatistics struct that captures the information we want? 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp <https://reviews.apache.org/r/30015/#comment119272> This is a bit tricky, you are returning -1 to capture "no limit". Why not return a Result and document that None() means no limit? - Ben Mahler On Feb. 16, 2015, 8:42 a.m., Ritwik Yadav wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30015/ > ----------------------------------------------------------- > > (Updated Feb. 16, 2015, 8:42 a.m.) > > > Review request for mesos, Ben Mahler, Dominic Hamon, and Vinod Kone. > > > Bugs: MESOS-391 > https://issues.apache.org/jira/browse/MESOS-391 > > > Repository: mesos > > > 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 > 8a4fda97ee29c185471a69f60803efc193cbe922 > 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp > 8a2d445c2edaa70da0e7b50e14ef88b2d9224a16 > > Diff: https://reviews.apache.org/r/30015/diff/ > > > Testing > ------- > > Build succeeds. > > > Thanks, > > Ritwik Yadav > >
