29102641dd
Summary: Directory fsync might be expensive on btrfs and it may not be needed. Here are 4 directory fsync cases: 1. creating a new file: dir-fsync is not needed on btrfs, as long as the new file itself is synced. 2. renaming a file: dir-fsync is not needed if the renamed file is synced. So an API `FsyncAfterFileRename(filename, ...)` is provided to sync the file on btrfs. By default, it just calls dir-fsync. 3. deleting files: dir-fsync is forced by set `IOOptions.force_dir_fsync = true` 4. renaming multiple files (like backup and checkpoint): dir-fsync is forced, the same as above. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8903 Test Plan: run tests on btrfs and non btrfs Reviewed By: ajkr Differential Revision: D30885059 Pulled By: jay-zhuang fbshipit-source-id: dd2730b31580b0bcaedffc318a762d7dbf25de4a |
||
---|---|---|
.. | ||
composite_env_wrapper.h | ||
composite_env.cc | ||
emulated_clock.h | ||
env_basic_test.cc | ||
env_chroot.cc | ||
env_chroot.h | ||
env_encryption_ctr.h | ||
env_encryption.cc | ||
env_hdfs.cc | ||
env_posix.cc | ||
env_test.cc | ||
env.cc | ||
file_system_tracer.cc | ||
file_system_tracer.h | ||
file_system.cc | ||
fs_posix.cc | ||
fs_readonly.h | ||
fs_remap.cc | ||
fs_remap.h | ||
io_posix_test.cc | ||
io_posix.cc | ||
io_posix.h | ||
mock_env_test.cc | ||
mock_env.cc | ||
mock_env.h | ||
unique_id_gen.cc | ||
unique_id_gen.h |