mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akash Gupta <akash-gu...@hotmail.com>
Subject Re: Review Request 66455: Windows: Fixed `os::ftruncate()` to use `FileEndOfFileInfo`.
Date Mon, 09 Apr 2018 20:42:28 GMT

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


Ship it!




Ship It!

- Akash Gupta


On April 6, 2018, 11:09 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66455/
> -----------------------------------------------------------
> 
> (Updated April 6, 2018, 11:09 p.m.)
> 
> 
> Review request for mesos, Akash Gupta, Eric Mumau, John Kordich, Joseph Wu, and Michael
Park.
> 
> 
> Bugs: MESOS-8692
>     https://issues.apache.org/jira/browse/MESOS-8692
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This previously used the CRT API `_chsize_s()`, which required a CRT
> integer file descriptor. Instead, we can achieve the same behavior by
> calling `SetFileInformationByHandle(FileEndOfFileInfo)`. This is
> significantly easier than using `SetEndOfFile()`, as that requires (1)
> saving the original position, (2) seeking to the new position, (3)
> setting the end of the file at the new position, then (4) seeking back
> to the original position. Instead, this method just sets the end of
> the file directly based on the given `length`, much like `ftruncate()`
> on POSIX systems.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/os/windows/ftruncate.hpp fc4a8b5040d56fa9766687e44ce17fbe47d9e8f0

> 
> 
> Diff: https://reviews.apache.org/r/66455/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


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