rocksdb/db/db_impl
Jay Zhuang 29102641dd Skip directory fsync for filesystem btrfs (#8903)
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
2021-11-03 12:21:27 -07:00
..
compacted_db_impl.cc Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
compacted_db_impl.h Move compacted_db_impl.[c|h] to db/db_impl (#8082) 2021-03-23 13:49:26 -07:00
db_impl_compaction_flush.cc Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
db_impl_debug.cc Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
db_impl_experimental.cc Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
db_impl_files.cc Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
db_impl_open.cc Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
db_impl_readonly.cc Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
db_impl_readonly.h RocksJava - Add errorIfLogFileExists parameter to RocksDB.openReadOnly (#7046) 2020-09-17 15:41:25 -07:00
db_impl_secondary.cc Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
db_impl_secondary.h Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
db_impl_write.cc Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
db_impl.cc Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
db_impl.h Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00