• A
    Dynamic test whether sync_file_range returns ENOSYS (#5416) · 2c9df9f9
    Andrew Kryczka 提交于
    Summary:
    `sync_file_range` returns `ENOSYS` on Windows Subsystem for Linux even
    when using a supposedly supported filesystem like ext4. To handle this
    case we can do a dynamic check that a no-op `sync_file_range`
    invocation, which is accomplished by passing zero for the `flags`
    argument, succeeds.
    
    Also I rearranged the function and comments to hopefully make it more
    easily understandable.
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/5416
    
    Differential Revision: D15807061
    
    fbshipit-source-id: d31d94e1f228b7850ea500e6199f8b5daf8cfbd3
    2c9df9f9
io_posix.cc 32.8 KB