Hi Lucy, On Oct 4, 2016, at 5:35 PM, Lu, Yingqi <yingqi...@intel.com> wrote:
> Thank you very much for reviewing the patch and providing the detailed > error/warning messages. They are very helpful! You are welcome. > We will look into the issues and solve them in the next version of the patch. > Test cases for O_DIRECT and modified copyright year will be added in next > version too. Given that the functionality of O_DIRECT on Linux appears to be supported by other interfaces on OS X, Solaris, and Windows, I wonder whether the patch will need to be refactored in some way to accommodate these other operating systems? For reference it looks as if direct I/O on OS X uses the F_NOCACHE command of fcntl(2) [1] (although per some online comments this might have some problems), Solaris uses the advice argument of directio(3c) [2], and Windows uses a combination of flags passed to CreateFile() [3, 4]. Thanks, Brian [1] https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man2/fcntl.2.html [2] https://docs.oracle.com/cd/E26505_01/html/816-5168/directio-3c.html [3] https://support.microsoft.com/en-us/kb/99794 [4] https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx