mirror of https://github.com/facebook/rocksdb.git
5a2b4ed671
Summary: fs_posix.cc GetFreeSpace() calculates free space based upon a call to statvfs(). However, there are two extremely different values in statvfs's returned structure: f_bfree which is free space for root and f_bavail which is free space for non-root users. The existing code uses f_bfree. Many disks have 5 to 10% of the total disk space reserved for root only. Therefore GetFreeSpace() does not realize that non-root users may not have storage available. This PR detects whether the effective posix user is root or not, then selects the appropriate available space value. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8370 Reviewed By: mrambacher Differential Revision: D29032710 Pulled By: jay-zhuang fbshipit-source-id: 57feba34ed035615a479956d28f98d85735281c0 |
||
---|---|---|
.. | ||
composite_env.cc | ||
composite_env_wrapper.h | ||
env.cc | ||
env_basic_test.cc | ||
env_chroot.cc | ||
env_chroot.h | ||
env_encryption.cc | ||
env_encryption_ctr.h | ||
env_hdfs.cc | ||
env_posix.cc | ||
env_test.cc | ||
file_system.cc | ||
file_system_tracer.cc | ||
file_system_tracer.h | ||
fs_posix.cc | ||
fs_readonly.h | ||
fs_remap.cc | ||
fs_remap.h | ||
io_posix.cc | ||
io_posix.h | ||
io_posix_test.cc | ||
mock_env.cc | ||
mock_env.h | ||
mock_env_test.cc |